On May 1, 2006, at 9:35 PM, David Dooling wrote: > So, using the default separator, the tab character is the first > character in the second field (which is why 2.5 works).
Ah, got it. You're right, it's not a bug, just unexpected behaviour to me. Whereas other programs (e.g. perl, bash, awk, cut, join) include the blank or tab character as part of the default separator, sort does not. As you mentioned, that explains this difference in how sort works: $ echo -e 'x\tfig17\nx\tfig2' | sort -k 2.5n x fig2 x fig17 $ echo -e 'x\tfig17\nx\tfig2' | sort -t$'\t' -k 2.4n x fig2 x fig17 Fair enough. Thanks for clarifying. Regards, - Robert http://www.cwelug.org/downloads Help others get OpenSource software. Distribute FLOSS for Windows, Linux, *BSD, and MacOS X with BitTorrent _______________________________________________ CWE-LUG mailing list [email protected] http://www.cwelug.org/ http://www.cwelug.org/archives/ http://www.cwelug.org/mailinglist/
