linux (gnu) sort leading blanks
Hey, smart guys, riddle me this:
Input file to the sort command with no arguments is this:
<space><space>3
<space>2
1
Output on every version of linux I tried is:
1
<space>2
<space><space>3
But on EVERY SINGLE other operating system I tried
(including OS X, AIX, Solaris, Beos, QNX, Windows and Cygwin)
the output is the same as the input unless I use the -b argument.
That is the behavior I expected. Is linux gnu sort broken?
Extensive google can't find an answer.
It seems like -b is default behavior on linux.
How do I shut off -b ?
How do I get linux sort to give me the result I want?
The LC_ALL environment variable has no effect.
Why on earth the different behavior on linux?
Sucks that my scripts would need a special case just for linux.
Any ideas?
-R
|