One Day One GNU/Linux Command (COMM)

1 view
Skip to first unread message

Bharathi Subramanian

unread,
May 8, 2008, 1:22:21 AM5/8/08
to VEC-FOSS, GNU/Linux Users Group - Trichy, GNU/Linux User Group of TCE
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

Reply all
Reply to author
Forward
0 new messages