Date: Tue, 14 Jul 1998 10:25:49 +0300 (IDT) From: Eli Zaretskii To: "Peter J. Farley III" cc: djgpp AT delorie DOT com Subject: Re: sort -u problem/question In-Reply-To: <35aab37b.8000330@news1.banet.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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).