We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
'Sort' command #6
'Sort' command #6
Introduction and References
In linux, the most vanilla version of 'sort' simply rearranges the lines in a file, in lexicographical order. Using a variety of flags and options, sort can also be extended in various powerful ways.
The command can also be used for sorting tables of data, delimited by commas (csv) or tabs (tsv) or even spaces; on a particular column or field. The -k option helps sort the input file on a particular field, i.e. the column number.
A few useful resources to study these variations of sort are:
A Wikipedia entry for the 'sort' command
How to Sort Files in Linux using Sort Command