May 2013
Beginner to intermediate
384 pages
7h 40m
English
Sorting is a common task that we can encounter with text files. The sort command helps 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 (or duplicate) lines from a text or stdin. This recipe illustrates most of the use cases with sort and uniq commands.
The sort command accepts input as filenames, as well as from stdin (standard input) and outputs the result by writing into stdout. The same applies to the uniq command.
file1.txt and file2.txt ...Read now
Unlock full access