Basic Linux Tutorial
Computer Tutorial

Filter ( tr, wc, and sort) Commands



Filter ( tr, wc, and sort) Commands

uniq

The uniq command are used to remove the duplicate form sorted list.
Synopsis :
uniq   [option]   files
Option
-c   count the occurrence of each lines.
-d   print only duplicate lines
-D   print all duplicate lines
-s   Avoid comparing first N character
-u   print only unique lines

comm

This command compare two strings or files and tells what line number is different.
Synopsis :
comm   [option]   file1   file2

sed

sed is a stream editor used for modifying the files in linux.
Synopsis :
sed   [option]   files
Example :
sed   ‘s/unxi/linux/’   file.txt