While going through an article on Linux text processing commands, I came across Linux sort command. I found this command interesting. Sorting is very much useful when dealing with DB files, CSV, xls, log files in fact a text file to. By default sort command will sort according to. Sort is a Linux program used for printing lines of input text files and concatenation of all files in sorted order. Sort command takes blank space. SORT command is used to sort a file, arranging the records in a particular order. By default, the sort command sorts file assuming the contents are ASCII. sort is a simple and very useful command which will rearrange the lines in a text file so that they are sorted, numerically and alphabetically. would display the file sorted by the 3rd column assuming the columns If you understand "column" as in text file (4th character) then yes, your. Looking for a command line utility to sort content in text files? Look no further than Sort, a tool specifically built for this purpose. In this tutorial. sort -nk4 file -n for numerical sort -k for providing key. or add -r option for reverse sorting sort -nrk4 file. Write sorted concatenation of all FILE(s) to standard output. This article describes how you can sort lines of a text file in Linux.