OSDN Git Service

coreutils: Update to coreutils 8.22
[linuxjm/coreutils.git] / original / man1 / join.1
1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.43.3.
2 .TH JOIN "1" "May 2014" "GNU coreutils 8.22" "User Commands"
3 .SH NAME
4 join \- join lines of two files on a common field
5 .SH SYNOPSIS
6 .B join
7 [\fIOPTION\fR]... \fIFILE1 FILE2\fR
8 .SH DESCRIPTION
9 .\" Add any additional description here
10 .PP
11 For each pair of input lines with identical join fields, write a line to
12 standard output.  The default join field is the first, delimited
13 by whitespace.  When FILE1 or FILE2 (not both) is \-, read standard input.
14 .TP
15 \fB\-a\fR FILENUM
16 also print unpairable lines from file FILENUM, where
17 FILENUM is 1 or 2, corresponding to FILE1 or FILE2
18 .TP
19 \fB\-e\fR EMPTY
20 replace missing input fields with EMPTY
21 .TP
22 \fB\-i\fR, \fB\-\-ignore\-case\fR
23 ignore differences in case when comparing fields
24 .TP
25 \fB\-j\fR FIELD
26 equivalent to '\-1 FIELD \fB\-2\fR FIELD'
27 .TP
28 \fB\-o\fR FORMAT
29 obey FORMAT while constructing output line
30 .TP
31 \fB\-t\fR CHAR
32 use CHAR as input and output field separator
33 .TP
34 \fB\-v\fR FILENUM
35 like \fB\-a\fR FILENUM, but suppress joined output lines
36 .TP
37 \fB\-1\fR FIELD
38 join on this FIELD of file 1
39 .TP
40 \fB\-2\fR FIELD
41 join on this FIELD of file 2
42 .TP
43 \fB\-\-check\-order\fR
44 check that the input is correctly sorted, even
45 if all input lines are pairable
46 .TP
47 \fB\-\-nocheck\-order\fR
48 do not check that the input is correctly sorted
49 .TP
50 \fB\-\-header\fR
51 treat the first line in each file as field headers,
52 print them without trying to pair them
53 .TP
54 \fB\-z\fR, \fB\-\-zero\-terminated\fR
55 end lines with 0 byte, not newline
56 .TP
57 \fB\-\-help\fR
58 display this help and exit
59 .TP
60 \fB\-\-version\fR
61 output version information and exit
62 .PP
63 Unless \fB\-t\fR CHAR is given, leading blanks separate fields and are ignored,
64 else fields are separated by CHAR.  Any FIELD is a field number counted
65 from 1.  FORMAT is one or more comma or blank separated specifications,
66 each being 'FILENUM.FIELD' or '0'.  Default FORMAT outputs the join field,
67 the remaining fields from FILE1, the remaining fields from FILE2, all
68 separated by CHAR.  If FORMAT is the keyword 'auto', then the first
69 line of each file determines the number of fields output for each line.
70 .PP
71 Important: FILE1 and FILE2 must be sorted on the join fields.
72 E.g., use "sort \fB\-k\fR 1b,1" if 'join' has no options,
73 or use "join \fB\-t\fR ''" if 'sort' has no options.
74 Note, comparisons honor the rules specified by 'LC_COLLATE'.
75 If the input is not sorted and some lines cannot be joined, a
76 warning message will be given.
77 .PP
78 GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
79 Report join translation bugs to <http://translationproject.org/team/>
80 .SH AUTHOR
81 Written by Mike Haertel.
82 .SH COPYRIGHT
83 Copyright \(co 2013 Free Software Foundation, Inc.
84 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
85 .br
86 This is free software: you are free to change and redistribute it.
87 There is NO WARRANTY, to the extent permitted by law.
88 .SH "SEE ALSO"
89 comm(1), uniq(1)
90 .PP
91 The full documentation for
92 .B join
93 is maintained as a Texinfo manual.  If the
94 .B info
95 and
96 .B join
97 programs are properly installed at your site, the command
98 .IP
99 .B info coreutils \(aqjoin invocation\(aq
100 .PP
101 should give you access to the complete manual.