The most often missed thing about Unix sort is its incredible versatility. If MSDOS sort is an eggbeater, this is a Cuisinart.
Sure, probably 99% of the time Unix folks don't do anything special with it: it's just "sort this" or "sort -r that". Once in a while we'll throw in a "+4", "-u" or a "-n", but most of sort's power goes unused (just like your Cuisinart).
I'm not suggesting that you should go read the man page and become an expert on the more esoteric features. Just like everyone else, you won't need them very often, so why expend the effort? However, you might want to play around a bit to understand the power that is there, so if the need for it ever arises, you'll know that sort is a tool you can use. And who knows, someday you might use that expensive blender for something more than Banana Daiquiris, right?
Check out sort -g vs. sort -n and Sort -u vs. uniq, too.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-07-05 Tony Lawrence
Yeah, it's obsolete, clunky, insecure and broken, but people still use this stuff (Tony Lawrence)
Printer Friendly Version
sort Copyright © September 2003 Tony Lawrence
Have you tried Searching this site?
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.
Contact us
Printer Friendly Version