sort command
The sort command is used for sorting the text data in ascending order.
Syntax of sort command:
sort filename
Sample code:
Let us create a text file chr.txt which has some random letters in random order :
cat > chr.txt
sort chr.txt
Output:
Explanation:
We have sorted the names.txt file in ascending order format by using the sort command along with the filename.
Useful Commands For Filtering Text for Effective File Operations in Linux
In this article, let us learn about different commands used in Linux for filtering text to implement effective file operations on Linux Machines.