bug-coreutils
[Top][All Lists]
Advanced

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

sort 5.97 bug sorting a month embedded in a field


From: Gordon Grimes
Subject: sort 5.97 bug sorting a month embedded in a field
Date: Tue, 26 Sep 2006 17:01:20 -0700

Hi,
I'm unable to get "M" (month) to sort from within a field. See below.
(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
      1 01-NOV-2005
      1 01-OCT-2005
     13 01-JAN-2006
     13 02-DEC-2005
     16 01-DEC-2005
     31 01-FEB-2006
     55 01-MAR-2006
    142 01-APR-2006
    145 02-APR-2006
  13312 01-MAY-2006
[534] > cat may_dates | sort -k2.4,2.7M  ## tested inclusiveness too, no
luck
      1 01-NOV-2005
      1 01-OCT-2005
     13 01-JAN-2006
     13 02-DEC-2005
     16 01-DEC-2005
     31 01-FEB-2006
     55 01-MAR-2006
    142 01-APR-2006
    145 02-APR-2006
  13312 01-MAY-2006

FYI,
Gordon Grimes





reply via email to

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