134 lines
4.4 KiB
HTML
134 lines
4.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of JOIN</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>JOIN</H1>
|
|
Section: User Commands (1)<BR>Updated: September 2019<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
join - join lines of two files on a common field
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>join</B>
|
|
|
|
[<I>,OPTION/</I>]... <I>,FILE1 FILE2/</I>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
<P>
|
|
|
|
For each pair of input lines with identical join fields, write a line to
|
|
standard output. The default join field is the first, delimited by blanks.
|
|
<P>
|
|
|
|
When FILE1 or FILE2 (not both) is -, read standard input.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-a</B> FILENUM<DD>
|
|
also print unpairable lines from file FILENUM, where
|
|
FILENUM is 1 or 2, corresponding to FILE1 or FILE2
|
|
<DT id="2"><B>-e</B> EMPTY<DD>
|
|
replace missing input fields with EMPTY
|
|
<DT id="3"><B>-i</B>, <B>--ignore-case</B><DD>
|
|
ignore differences in case when comparing fields
|
|
<DT id="4"><B>-j</B> FIELD<DD>
|
|
equivalent to '-1 FIELD <B>-2</B> FIELD'
|
|
<DT id="5"><B>-o</B> FORMAT<DD>
|
|
obey FORMAT while constructing output line
|
|
<DT id="6"><B>-t</B> CHAR<DD>
|
|
use CHAR as input and output field separator
|
|
<DT id="7"><B>-v</B> FILENUM<DD>
|
|
like <B>-a</B> FILENUM, but suppress joined output lines
|
|
<DT id="8"><B>-1</B> FIELD<DD>
|
|
join on this FIELD of file 1
|
|
<DT id="9"><B>-2</B> FIELD<DD>
|
|
join on this FIELD of file 2
|
|
<DT id="10"><B>--check-order</B><DD>
|
|
check that the input is correctly sorted, even
|
|
if all input lines are pairable
|
|
<DT id="11"><B>--nocheck-order</B><DD>
|
|
do not check that the input is correctly sorted
|
|
<DT id="12"><B>--header</B><DD>
|
|
treat the first line in each file as field headers,
|
|
print them without trying to pair them
|
|
<DT id="13"><B>-z</B>, <B>--zero-terminated</B><DD>
|
|
line delimiter is NUL, not newline
|
|
<DT id="14"><B>--help</B><DD>
|
|
display this help and exit
|
|
<DT id="15"><B>--version</B><DD>
|
|
output version information and exit
|
|
</DL>
|
|
<P>
|
|
|
|
Unless <B>-t</B> CHAR is given, leading blanks separate fields and are ignored,
|
|
else fields are separated by CHAR. Any FIELD is a field number counted
|
|
from 1. FORMAT is one or more comma or blank separated specifications,
|
|
each being 'FILENUM.FIELD' or '0'. Default FORMAT outputs the join field,
|
|
the remaining fields from FILE1, the remaining fields from FILE2, all
|
|
separated by CHAR. If FORMAT is the keyword 'auto', then the first
|
|
line of each file determines the number of fields output for each line.
|
|
<P>
|
|
|
|
Important: FILE1 and FILE2 must be sorted on the join fields.
|
|
E.g., use "sort <B>-k</B> 1b,1" if 'join' has no options,
|
|
or use "join <B>-t</B> ''" if 'sort' has no options.
|
|
Note, comparisons honor the rules specified by 'LC_COLLATE'.
|
|
If the input is not sorted and some lines cannot be joined, a
|
|
warning message will be given.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Written by Mike Haertel.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>REPORTING BUGS</H2>
|
|
|
|
GNU coreutils online help: <<A HREF="https://www.gnu.org/software/coreutils/">https://www.gnu.org/software/coreutils/</A>>
|
|
<BR>
|
|
|
|
Report join translation bugs to <<A HREF="https://translationproject.org/team/">https://translationproject.org/team/</A>>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
Copyright © 2018 Free Software Foundation, Inc.
|
|
License GPLv3+: GNU GPL version 3 or later <<A HREF="https://gnu.org/licenses/gpl.html">https://gnu.org/licenses/gpl.html</A>>.
|
|
<BR>
|
|
|
|
This is free software: you are free to change and redistribute it.
|
|
There is NO WARRANTY, to the extent permitted by law.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?1+comm">comm</A>(1), <A HREF="/cgi-bin/man/man2html?1+uniq">uniq</A>(1)
|
|
<P>
|
|
|
|
<BR>
|
|
|
|
Full documentation at: <<A HREF="https://www.gnu.org/software/coreutils/join">https://www.gnu.org/software/coreutils/join</A>>
|
|
<BR>
|
|
|
|
or available locally via: info '(coreutils) join invocation'
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="16"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="17"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="18"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="19"><A HREF="#lbAE">AUTHOR</A><DD>
|
|
<DT id="20"><A HREF="#lbAF">REPORTING BUGS</A><DD>
|
|
<DT id="21"><A HREF="#lbAG">COPYRIGHT</A><DD>
|
|
<DT id="22"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:17 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|