Funny sort

ber at enea.UUCP ber at enea.UUCP
Thu Jul 7 07:03:55 AEST 1983


Can anyone explain why sort (version 4.2 in Berkeley 4.1) seems
to include the fiel separation character in the sorting.
Well, anyhow in this case. If a file contains

	a#b
	a1#b
	a2#b

and one sorts this with

	sort -t# file

the output is identical with that in the file. But if I change
all the #'s to :'s, and then sort -t: file, the output is

	a1:b
	a2:b
	a:b

(observing that #<1<2<:). I would expect the same result regardless
of the delimiter used.

	Bjorn Eriksen	(...!mcvax!enea!ber)



More information about the Comp.bugs.4bsd.ucb-fixes mailing list