Bash Using sort Sort command output


Example

sort command is used to sort a list of lines.

Input from a file

sort file.txt  

Input from a command

You can sort any output command. In the example a list of file following a pattern.

find * -name pattern | sort