Commit | Line | Data |
---|---|---|
789fc9f9 KT |
1 | .th COMM I 8/21/73 |
2 | .sh NAME | |
3 | comm \*- print lines common to two files | |
4 | .sh SYNOPSIS | |
5 | .bd comm | |
6 | [ | |
7 | .bd \*- | |
8 | [ | |
9 | .bd 123 | |
10 | ] | |
11 | ] file1 file2 | |
12 | [ | |
13 | file3 | |
14 | ] | |
15 | .sh DESCRIPTION | |
16 | .it Comm | |
17 | reads | |
18 | .it file1 | |
19 | and | |
20 | .it file2, | |
21 | which should be in sort, | |
22 | and produces a three column output: lines only in | |
23 | .it file1; | |
24 | lines only in | |
25 | .it file2; | |
26 | and lines in both files. | |
27 | .s3 | |
28 | If | |
29 | .it file3 | |
30 | is given, the output will be placed there; | |
31 | otherwise it will be written on the standard output. | |
32 | .s3 | |
33 | Flags 1, 2, or 3 suppress printing of the corresponding | |
34 | column. | |
35 | Thus | |
36 | .bd comm | |
37 | .bd \*-12 | |
38 | prints only the lines common to the two files; | |
39 | .bd comm | |
40 | .bd \*-23 | |
41 | prints only lines in the first file but not in the second; | |
42 | .bd comm | |
43 | .bd \*-123 | |
44 | is a no-op. | |
45 | .s3 | |
46 | .sh "SEE ALSO" | |
47 | uniq(\|I\|), proof(\|I\|), cmp(\|I\|) | |
48 | .sh BUGS |