4.3BSD sort(1) broken for records with embedded nulls
Steve Grandi
grandi at noao.UUCP
Wed Aug 20 10:11:07 AEST 1986
Subject: sort will no longer work on records with embedded nulls
Index: usr.bin/sort.c 4.3BSD
Description:
For 4.3BSD, sort(1) was modified (for efficiency) to use fgets/fputs to
read and write data records instead of getc/putc. This change breaks sort
for data records that have embedded nulls; they will generate spurious error
messages "missing newline before EOF" and the data will be totally scrambled.
Repeat-By:
Read the code.
Fix:
1) Reinstall the slow 4.2BSD version.
2) Don't use sort(1) as a quick hack when you really should use qsort(3)
--
Steve Grandi, National Optical Astronomy Observatories, Tucson, AZ, 602-325-9228
{arizona,decvax,hao,ihnp4,seismo}!noao!grandi grandi%draco at Hamlet.Caltech.Edu
More information about the Comp.unix.wizards
mailing list