-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Ethan Baldridge on 7/16/2009 3:06 PM: > I had a list to sort at work today that needed to be in the format "A B > C D E... AA BB CC DD" but sort(1) only returns results as "A AA B BB C > CC".
Thanks for the ideas; it is especially nice when ideas are accompanied by a patch. However,... sort is already quite powerful. I'm not sure we need a new command line option unless we can prove there is no way to do what you want with the existing options. Taking your example, here's a length-based sort: $ echo A B C D E AA BB CC DD EE | tr ' ' '\n' | sort -k1,1.1 -k1,1.2 A AA B BB C CC D DD E EE > > Here it is attached as a unified diff. I tested it and it seems to work > naturally in conjunction with other operands, so I don't believe there > are likely to be problems. The HACKING file gives more ideas on how best to contribute a patch; we prefer patches against the latest git sources, rather than the last release. http://git.savannah.gnu.org/cgit/coreutils.git/tree/HACKING - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkpf+RUACgkQ84KuGfSFAYDP2wCgx0LDEtKJm+QQOZ0ToDRAATx6 IPUAoJCxLznvpQsh/PfVWdI1sn6lP5it =D+MC -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils