Uniqify Your Linux Experience
©2021 SiemHunters
Uniq is a command-line utility in Linux that helps in filtering out the duplicate lines from a file or input stream.
The uniq command works by comparing adjacent lines in a sorted file and removing duplicates.
©2021 SiemHunters
The basic syntax of the uniq command is as follows: uniq [OPTION]... [INPUT [OUTPUT]]
Some of the commonly used options with the uniq command are -c (count the number of occurrences of each line), -d (print only the duplicate lines), -i (ignore case when comparing lines), and -u (print only the unique lines).
©2021 SiemHunters
One example of using the uniq command is to remove duplicate lines from a file.
Another example is to count the number of occurrences of each unique line in a file.
©2021 SiemHunters
©2021 SiemHunters
©2021 SiemHunters
©2021 SiemHunters
Topic