Path: utzoo!attcan!uunet!zephyr.ens.tek.com!tekcrl!tekgvs!sail!terryl From: terryl@sail.LABS.TEK.COM Newsgroups: comp.bugs.sys5 Subject: Re: Sort bug causes data loss Keywords: bug, sort Message-ID: <8129@tekgvs.LABS.TEK.COM> Date: 17 Sep 90 17:31:11 GMT References: <2675@crdos1.crd.ge.COM> Sender: news@tekgvs.LABS.TEK.COM Reply-To: terryl@sail.LABS.TEK.COM (Terry Laskodi) Organization: Tektronix, Inc., Beaverton, OR. Lines: 19 In article <2675@crdos1.crd.ge.COM> davidsen@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.....