bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Did the options for the Unix sort command change?


From: Michael Alston
Subject: RE: Did the options for the Unix sort command change?
Date: Mon, 18 Aug 2008 10:09:36 -0700

Jim,

Thx for bringing me into the new millenium.
I kinda liked the 19xx's though ... those years were good to me.

BTW, in my example I meant to state:
  % sort +5 myfile
rather than
  % sort -5 myfile.

I am reading and learning about the current options to the sort command by 
surfing the WWW.
The command is pretty versatile.  I didn't realize.  May the 20xx's aren't so 
bad after all.

Which website does the best job of presenting usage examples for the sort 
command, for a non-CS major?

Have a great week!
MikeA

-----Original Message-----
From: Jim Meyering [mailto:address@hidden
Sent: Mon 8/18/2008 9:35 AM
To: Michael Alston
Cc: address@hidden
Subject: Re: Did the options for the Unix sort command change?
 
"Michael Alston" <address@hidden> 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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]