I'm sure I once found a unix command which could print the common lines from two or more files, does anyone know its name? It was much simpler than diff
.
views:
1628answers:
2
+8
A:
Maybe you mean comm
?
Compare sorted files FILE1 and FILE2 line by line.
With no options, produce three-column output. Column one contains lines unique to FILE1, column two contains lines unique to FILE2, and column three contains lines common to both files.
The secret in finding these information are the info pages. For GNU programs, they are much more detailed than their man-pages. Try info coreutils
and it will list you all the small useful utils.
Johannes Schaub - litb
2008-12-17 06:41:40