Sorting is a common task that we always encounter with text files. Hence, in text processing tasks, sort is very useful.
sort commands help us to perform sort operations over text files and
stdin. Most often, it can also be coupled with many other commands to produce the required output.
uniq is another command that is often used along with a
sort command. It helps to extract unique lines from a text or
uniq can be coupled to find duplicates. This recipe illustrates most of the use cases with
sort command accepts input as filenames as well as from
stdin (Standard input) and outputs the result by writing into
uniq command follows the same sequence ...