Re: sort 5.97 bug sorting a month embedded in a field
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
Re: sort 5.97 bug sorting a month embedded in a field
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Gordon Grimes on 9/26/2006 9:52 PM: Eric, I don't see it set in the cygwin environment. Why didn't you mention your platform in the first case? Cygwin lacks locales (thanks to its use of newlib, which is currently hardcoded to the C locale), so not setting LC_ALL won't really make much of a difference there. Can you get it to work with embedded values? Yes, see Paul's mail, or experiment with -b. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFGnAg84KuGfSFAYARAmbiAKDAOMgAtwSr6fytdQCb5v0SGg0ENwCeN0Vv Xj2AowrqghbGm0P4aMmXUAQ= =GkF2 -END PGP SIGNATURE- ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
sort 5.97 bug sorting a month embedded in a field
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 ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils