[Ilugc] One Day One GNU/Linux Command (COMM)

Bharathi Subramanian sbharathi at MidasComm.Com
Thu May 8 10:51:30 IST 2008


One Day One GNU/Linux Command
=============================

comm - Compare 2 sorted files line by line

Summary: 

Compare two sorted files F1 and F2 line by line.

Examples:

$ comm F1 F2 -- Output contain 3 columns (Col1 - Uniq to F1, 
                Col2 - Uniq to F2 and Col3 - Common to F1 & F2).

$ comm -1 F1 F2 -- Suppress lines unique to F1

$ comm -2 F1 F2 -- Suppress lines unique to F2

$ comm -3 F1 F2 -- Suppress common lines to F1 & F2

$ comm -13 F1 F2 -- Show lines from F2, which is not in F1

$ comm -23 F1 F2 -- Show lines from F1, which is not in F2

Read: man comm

HTH :)
-- 
Bharathi S



More information about the ilugc mailing list