Sorting the content of a file

The sort command is a simple database tool. It allows you to specify the field to be sorted on and the type of sort to be carried out on it.

   sort filename

Lines are sorted into the following order: lines starting with numbers come first, followed by lines starting with upper-case letters, which are followed by lines starting with lower-case letters and finally symbols such as % and !.


[Home] [Search] [Index] This site maintained by webmaster@cs.auckland.ac.nz