Mail Archives: djgpp/1998/01/29/05:30:37
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 <Jerzy DOT Witkowski AT ii DOT uni DOT wroc DOT pl> 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 <__|
- Raw text -