|
|
Addendum to hint
Right after I sent in this hint, it hit me:
Addendum to hint
I've always disliked the terminology of the sort man page, which is pretty much written for advanced programmers - a simpler explanation is that the first value is the word you want to sort on, and the second value is the character in that word. It's actually a bit more complex than that, as it is based on string tokenization (strings are broken up by a character specified by the -t parameter, default is space), but the concept is easier to understand this way.
Addendum to hint
Yeah, the 0 for "first" came as no surprise, but not because I know C or anything . . .
Addendum to hint
sort is one of those weird programs that evolved in two different ways in System V and BSD. The +n syntax, zero-based, came from BSD. System V introduced the same functionality with the "-k" flag, which is one-based. So your "sort +2" is the same as "sort -k 3". I don't know if this makes things more or less confusing =) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|