From: Jerzy Witkowski Newsgroups: comp.os.msdos.djgpp Subject: Bug in sort program Date: 29 Jan 1998 11:11:50 +0100 Organization: University of Wroclaw Lines: 47 Sender: jwi AT swiatowit Message-ID: NNTP-Posting-Host: swiatowit.ii.uni.wroc.pl To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I think that there is a bug in `sort' program. It *sometimes* ignores new style key options (usually during first invocation). I obtained the same results on two different machines. I can't check whether it is something specific to DJGPP or GNU-wide sort bug. Could someone with access to UNIX GNU sort program test it? Here is my session script: D:\USER>cat a <- example file e c a d b e c a d b D:\USER>sort -k 2,2 a <- sort by second column, new option style a d <- wrong answer, sorted by first column b e c a d b e c D:\USER>sort +1 -2 a <- sort by second column, old option style c a <- correct answer d b e c a d b e D:\USER>sort -k 2,2 a <- again new option style c a <- now correct answer! d b e c a d b e D:\USER>sort --version sort - GNU textutils-1.19 -- Jerzy Witkowski o o University of Wroclaw, Institute of Computer Science /| | |/| Przesmyckiego 20, PL-51151 Wroclaw |/| | | room: 11, phone: 0048 71 3247360 /| |/^\| | phone/fax office secretary: 0048 71 3251271 <__|