<P> In Unix - like operating systems, sort is a standard command line program that prints the lines of its input or concatenation of all files listed in its argument list in sorted order . Sorting is done based on one or more sort keys extracted from each line of input . By default, the entire input is taken as sort key . Blank space is the default field separator . </P> <P> The "- r" flag will reverse the sort order . </P>

Unix command to sort the contents of a file