Mail Archives: djgpp/1998/07/14/03:26:00
On Tue, 14 Jul 1998, Peter J. Farley III wrote:
> I'm trying to use the DJGPP port of GNU sort with the "-u" option to
> eliminate all but one equal-key record. However, all I ever get is a
> single record output, the first record in the file.
>
> Is this a known problem with the DJGPP port, or am I not using sort
> correctly?
The latter.
> C:\stest>sort +2 +5 -t \t -u sortuniq.tst
> field1 field2 field3 9 field3 field4 field5 field6/9 field7
Who said that `sort' understands \t as a TAB? This would probably
work in a Unix shell, since the shell itself converts \t to a TAB, but
DOS shells don't do that. You need to actually press a TAB (and
enclose it in quotes) to make this work. When I did that, your
example worked for me.
Btw, I don't even understand why did you need to use the -t switch:
TAB is considered a field separator by default, since it is a
whitespace character (see the `sort' docs).
- Raw text -