"Gordon Grimes" <[EMAIL PROTECTED]> writes:

> (I have 18 years experience with 'sort')
>
> [529] > cat dates 
>     142 01-APR-2006
>      16 01-DEC-2005
>      31 01-FEB-2006
>      13 01-JAN-2006
>      55 01-MAR-2006
>   13312 01-MAY-2006
>       1 01-NOV-2005
>       1 01-OCT-2005
>     145 02-APR-2006
>      13 02-DEC-2005
> [533] > cat may_dates | sort -k2.4,2.6M   ## should work

"sort --help" says "If neither the -t nor the -b option is in effect,
the characters in a field are counted from the beginning of the
preceding whitespace."  That's what's happening here.  So you want
sort -k2.5,2.7M, to take that white space into account.  There's no
bug.

(Now you have 18 years plus 1 day experience with 'sort'.  :-)


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to