Examples of changing the sort order

1. To sort a file in dictionary order:

   sort -d +1 -2names > orders

Lines in the file names are sorted on field 2 into dictionary order and the result placed in the file orders.

2. To sort a file in month order:

   sort -M +2 -3 -o breakdown orders

Lines in the file orders are sorted on field3 into month order and the result placed in the file breakdown.


Top document