Examples of changing the sort order

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.


To sort a file in month order:

   sort -M +2 -3 -o breakdown orders

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


[Home] [Search] [Index] This site maintained by bondaren@thsun1.jinr.ru