-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Andreas Schwab on 6/28/2009 2:28 AM: >> i want to have the files sorted by (1) path then (2) file name then (3) cfg >> order. so i use this: >> sort -t% -k2 -k4 -k3 > > Your sort keys overlap. > > -k, --key=POS1[,POS2] start a key at POS1 (origin 1), end it at POS2 > (default end of line) > ^^^^^^^^^^^^^^^^^^^^^
To put it more directly, you want: sort -t% -k2,2 -k4,4 -k3,3 - -- 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 iEYEARECAAYFAkpHgSgACgkQ84KuGfSFAYAgWgCgi4STLM4eE2s48DVPAVV3gkAq HIEAnRw1ixP1jSiql9HmcONkHPuf/CUE =ZcOT -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils