Saturday, March 21, 2009

Unix sort command

The sort command has -u option for unique. Therefore, the command "sort file | uniq" can be simplified as "sort -u file".

To sort in arithmetic order, use -n option, and -r option is used for reverse order.

No comments: