[This is a rewriting of a similar question that I asked back ... Sorry for the confusion!]
I am confused in leading and standard sort utility. Consider the contents of myfile :
a b a
Running sort -t : myfile gives an unexpected result, at least for me:
a a b
It makes sense? <space> should appear either before az (as in the case of ASCII), or after. In the first case, I would expect
a b a
and in the second case
a b a
Why does it seem that sort uses the -b option (ignore leaders) if when it was not turned on? In fact, to be safe, I added the -t option to have exactly one field on each line. ( According to the POSIX standard , field âAâ contains the maximum sequence of non-separating characters and, in the absence of the -t option, any previous field separator. â sort myfile gives the same output, which is also unexpected.)
Thanks in advance!
source share