1COMBINE(1) COMBINE(1)
2
3
4
6 combine - combine sets of lines from two files using boolean operations
7
9 combine file1 and file2
10
11 combine file1 not file2
12
13 combine file1 or file2
14
15 combine file1 xor file2
16
17 _ file1 and file2 _
18
19 _ file1 not file2 _
20
21 _ file1 or file2 _
22
23 _ file1 xor file2 _
24
26 combine combines the lines in two files. Depending on the boolean
27 operation specified, the contents will be combined in different ways:
28
29 and Outputs lines that are in file1 if they are also present in file2.
30
31 not Outputs lines that are in file1 but not in file2.
32
33 or Outputs lines that are in file1 or file2.
34
35 xor Outputs lines that are in either file1 or file2, but not in both
36 files.
37
38 "-" can be specified for either file to read stdin for that file.
39
40 The input files need not be sorted, and the lines are output in the
41 order they occur in file1 (followed by the order they occur in file2
42 for the two "or" operations). Bear in mind that this means that the
43 operations are not commutative; "a and b" will not necessarily be the
44 same as "b and a". To obtain commutative behavior sort and uniq the
45 result.
46
47 Note that this program can be installed as "_" to allow for the
48 syntactic sugar shown in the latter half of the synopsis (similar to
49 the test/[ command). It is not currently installed as "_" by default,
50 but you can alias it to that if you like.
51
53 join(1)
54
56 Copyright 2006 by Joey Hess <id@joeyh.name>
57
58 Licensed under the GNU GPL.
59
60
61
62moreutils 2019-10-20 COMBINE(1)