Name

sort - Sort a file

Syntax

sort file

Description

The sort command allows you to view the alphabetized contents of a file. Example:

sort vivaldi

This displays the contents of the file “vivaldi” in alphabetical order. If the last argument starts with ‘>’, the sorted lines are written into that file.

Note

Sort handles files with 400 lines of text or less.

See Also

grep(C), split(C), wc(C)