Sort¤ test.txt X 1 3 Y 2 5 A 5 2 Default¤ Command cat test.txt | sort Output A 5 2 X 1 3 Y 2 5 Sort by column¤ Command cat test.txt | sort -k 2 Output X 1 3 Y 2 5 A 5 2