Sort bug causes data loss

terryl at sail.LABS.TEK.COM terryl at sail.LABS.TEK.COM
Tue Sep 18 03:31:11 AEST 1990


In article <2675 at crdos1.crd.ge.COM> davidsen at crdos1.crd.ge.com (bill davidsen) writes:
+
+  I have discovered what appears to be a serious bug in the sort
+routine used in several SysV variants including Stellar. Since it
+causes silent loss of data I am cross posting a bit more than I usually
+do.
+
+  The problem occurs when the options -n (numeric) and -u (discard
+duplicates) are used together sorting data which has a fixed width
+numeric as the first key field. The results is output of only one line,
+regardless of the input data. I found this by losing 15 months of data
+(yes it was backed up). Since sort is often in shell scripts run from
+cron to do system things, this problem might not be instantly noticed.


     Interesting. Right now I'm running on a Solbourne, which is a Sun
clone, and it has the dual BSD/SYSV environment.

     The bug shows up using the SYSV sort, but not the BSD sort.....



More information about the Comp.bugs.sys5 mailing list