Sort -k 2

Adnan Khurshid on February 6th, 2011

To display the files sorted in ascending order, we use the command ‘sort’. Suppose we have the following file and we want to sort out the data. linux:~ # more sort.txtBarrack ObamaGeorge BushBill ClintonRonald ReaganJimmy Carterlinux:~ # To sort the file we use the following command:

Continue reading about How to sort files in Linux