help-gnu-utils
[Top][All Lists]
Advanced

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

sort ignores underscores (_)???


From: kj
Subject: sort ignores underscores (_)???
Date: Tue, 19 Feb 2008 15:58:57 +0000 (UTC)
User-agent: nn/6.7.3


sort behaves erratically with underscores:

  % ( echo _c; echo __; echo _a ) | sort 
  __
  _a
  _c

Here, __ < _a, which implies that _ < a, but

  % ( echo _cc; echo __b; echo _ac ) | sort 
  _ac
  __b
  _cc

Now _ac < __b < _cc, which implies that a < _.

How can I get sort to treat _ consistently?  (I don't have a strong
preference for either _ < a or a < _ as long as it is consistent.)

TIA!

kj

-- 
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.


reply via email to

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