Sheila Yao <s...@secureworks.com> writes:

> sort -n -k2.1,2.4 /tmp/sort.out
> /dev/emcpowera         47G   39G  7.8G  84% /DB1/DW/data9
                ^^^^
The sort key is probably not what you think it is.   I have marked it
for you.  Since the sort key is identical in all lines, sort has used
as a last resort the whole line as the sort key.

>From sort --help:

    POS is F[.C][OPTS], where F is the field number and C the character position
    in the field; both are origin 1.  If neither -t nor -b is in effect, 
characters
    in a field are counted from the beginning of the preceding whitespace.

You should probably just use the whole second field as the sort key.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Reply via email to