Re: Did the options for the Unix sort command change?
Michael Alston [EMAIL PROTECTED] wrote: Question: Did the options for the Unix sort command change? Yes. Some time ago. Why does: % sort -5 myfile no longer sort myfile by keying off of column 5? That precise syntax never worked. However, syntax like this used to be the norm: sort +3 -5 myfile Now, while that is still supported, you usually have to go through hoops (set the _POSIX2_VERSION envvar to some small number) to make it work. For details, read info coreutils standards and then the section on sort. ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: Did the options for the Unix sort command change?
Which website does the best job of presenting usage examples for the sort command, for a non-CS major? You can start with the examples in info coreutils sort. ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
RE: Did the options for the Unix sort command change?
Jim, You've taught me to fish, big time! I've been using Unix/Linux systems for decades and was only familiar with the man command for looking up commands. This info coreutils help feature is very informative, on the sort command and many others. What else have I been in the dark about? I guess its true ... Ya don't know what Ya don't know. BR, Mike a.k.a. Rip Van Winkle -Original Message- From: Jim Meyering [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2008 12:55 PM To: Michael Alston Cc: bug-coreutils@gnu.org Subject: Re: Did the options for the Unix sort command change? Which website does the best job of presenting usage examples for the sort command, for a non-CS major? You can start with the examples in info coreutils sort. ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: Did the options for the Unix sort command change?
Michael Alston wrote: This info coreutils help feature is very informative, on the sort command and many others. ... What else have I been in the dark about? You might find the GNU standards manual interesting reading. http://www.gnu.org/prep/standards/html_node/GNU-Manuals.html#GNU-Manuals http://www.gnu.org/prep/standards/html_node/index.html Bob ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: Did the options for the Unix sort command change?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Michael Alston on 8/14/2008 6:42 PM: Question: Did the options for the Unix sort command change? No. GNU sort has never accepted a digit as an option, nor does POSIX require it: http://www.opengroup.org/onlinepubs/009695399/utilities/sort.html However, I have no idea if you were used to another implementation of sort that might have provided -digit as an extension, probably short for - -kdigit. Why does: % sort -5 myfile no longer sort myfile by keying off of column 5? Column 5 or field 5? On the assumption that you might have mistyped: % sort -k5 myfile then this behavior is most likely a misunderstanding on your part. That particular command means to sort using the fifth and subsequent fields as the sort key. Finally, if you want to sort by the fifth field only, then you would use: % sort -k5,5 myfile - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -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 iEUEARECAAYFAkik1QsACgkQ84KuGfSFAYDR5wCfSm2U+ddKuTvqZRsm5reDhZsk /gEAmMU4bI/ybLA5rnk8R04/REzqb14= =W3mz -END PGP SIGNATURE- ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils