-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Béla Horváth on 8/9/2007 7:18 AM: > I have a problem with "sort" (I tested it on ubuntu 7.04, on Mac OSX, and on > AIX too, and they are identical)
Actually, this seems like a misunderstanding on your part as to how sort works. > > I try to sort the attached file. Field separator is <tab>, but in the > timestamp field between date and time there is a <space>, not a <tab>. > I have to sort as first key for timestamp (field 3) - "string like", and as > second key for sequence number, (field 6) - "numeric like". > > sort -t\<tab> -k3 ts.txt That says to use the string from the third field to the end of the line as the sort key. You probably meant: sort -t\<tab> -k3,3 ts.txt which says to use ONLY the third field as the sort key. Likewise for your other examples. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGuxgE84KuGfSFAYARApoEAKDD8uZzEtR8tT+V9WRxfhxjCsN0iwCfX/Qi PPRETOxgrLrFuVsZ4b7eS3M= =0w+4 -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
