bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sort] strange behavior.


From: Yasuhiro Take
Subject: [sort] strange behavior.
Date: Wed, 03 Jan 2001 17:50:03 +0900
User-agent: Wanderlust/2.3.0 (Roam) WEMIKO/1.14.0 (Zoomastigophora) FLIM/1.13.2 (Kasanui) APEL/10.2 Emacs/20.7 (i386-debian-linux-gnu) MULE/4.1 (AOI)

[ Give me Cc to every reply. Thanks. ]

Hello, there.

I've met strange behavior of sort when i set the field and the character
potision to 2 or more, by using -k option.

$ echo -e "a2\nb1" | sort -k 1.2
b1
a2

This is correct behavior, but

$ echo -e "g a2\ng b1" | dort -k 2.2
g a2
g b1

I expected the result is the same as before, 'b1' be coming first, but
it isn't. However, setting the character position to 3rd, where no
character actually exists, gives me the right result.

$ echo -e "g a2\ng b1" | dort -k 2.3
g b1
g a2

Setting the field position to 3rd or more makes no change.

Regards,

--
Yasuhiro TAKE



reply via email to

[Prev in Thread] Current Thread [Next in Thread]