APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

2003/09/08 sort

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.




Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Tony Lawrence



Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

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