{"id":5971,"date":"2022-12-20T18:57:47","date_gmt":"2022-12-20T21:57:47","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/join-man1p\/"},"modified":"2022-12-20T18:57:47","modified_gmt":"2022-12-20T21:57:47","slug":"join-man1p","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/join-man1p\/","title":{"rendered":"JOIN (man1p)"},"content":{"rendered":"<h1 align=\"center\">JOIN<\/h1>\n<p> <a href=\"#PROLOG\">PROLOG<\/a><br \/> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#OPERANDS\">OPERANDS<\/a><br \/> <a href=\"#STDIN\">STDIN<\/a><br \/> <a href=\"#INPUT FILES\">INPUT FILES<\/a><br \/> <a href=\"#ENVIRONMENT VARIABLES\">ENVIRONMENT VARIABLES<\/a><br \/> <a href=\"#ASYNCHRONOUS EVENTS\">ASYNCHRONOUS EVENTS<\/a><br \/> <a href=\"#STDOUT\">STDOUT<\/a><br \/> <a href=\"#STDERR\">STDERR<\/a><br \/> <a href=\"#OUTPUT FILES\">OUTPUT FILES<\/a><br \/> <a href=\"#EXTENDED DESCRIPTION\">EXTENDED DESCRIPTION<\/a><br \/> <a href=\"#EXIT STATUS\">EXIT STATUS<\/a><br \/> <a href=\"#CONSEQUENCES OF ERRORS\">CONSEQUENCES OF ERRORS<\/a><br \/> <a href=\"#APPLICATION USAGE\">APPLICATION USAGE<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#RATIONALE\">RATIONALE<\/a><br \/> <a href=\"#FUTURE DIRECTIONS\">FUTURE DIRECTIONS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COPYRIGHT\">COPYRIGHT<\/a> <\/p>\n<hr>\n<h2>PROLOG <a name=\"PROLOG\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This manual page is part of the POSIX Programmer\u2019s Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.<\/p>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">join \u2014 relational database operator<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">join <b>[<\/b>-a <i>file_number<\/i>|-v <i>file_number<\/i><b>] [<\/b>-e <i>string<\/i><b>] [<\/b>-o <i>list<\/i><b>] [<\/b>-t <i>char<\/i><b>] <br \/> [<\/b>-1 <i>field<\/i><b>] [<\/b>-2 <i>field<\/i><b>]<\/b> <i>file1 file2<\/i><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>join<\/i> utility shall perform an equality join on the files <i>file1<\/i> and <i>file2<\/i>. The joined files shall be written to the standard output.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The join field is a field in each file on which the files are compared. The <i>join<\/i> utility shall write one line in the output for each pair of lines in <i>file1<\/i> and <i>file2<\/i> that have join fields that collate equally. The output line by default shall consist of the join field, then the remaining fields from <i>file1<\/i>, then the remaining fields from <i>file2<\/i>. This format can be changed by using the <b>\u2212o<\/b> option (see below). The <b>\u2212a<\/b> option can be used to add unmatched lines to the output. The <b>\u2212v<\/b> option can be used to output only unmatched lines.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The files <i>file1<\/i> and <i>file2<\/i> shall be ordered in the collating sequence of <i>sort<\/i> <b>\u2212b<\/b> on the fields on which they shall be joined, by default the first in each line. All selected output shall be written in the same collating sequence.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The default input field separators shall be <blank> characters. In this case, multiple separators shall count as one field separator, and leading separators shall be ignored. The default output field separator shall be a <space>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The field separator and collating sequence can be changed by using the <b>\u2212t<\/b> option (see below).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the same key appears more than once in either file, all combinations of the set of remaining fields in <i>file1<\/i> and the set of remaining fields in <i>file2<\/i> are output in the order of the lines encountered.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the input files are not in the appropriate collating sequence, the results are unspecified.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>join<\/i> utility shall conform to the Base Definitions volume of POSIX.1-2017, <i>Section 12.2<\/i>, <i>Utility Syntax Guidelines<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The following options shall be supported: <b><br \/> \u2212a\u00a0<\/b><i>file_number<\/i><\/p>\n<p style=\"margin-left:26%;\">Produce a line for each unpairable line in file <i>file_number<\/i>, where <i>file_number<\/i> is 1 or 2, in addition to the default output. If both <b>\u2212a<\/b>1 and <b>\u2212a<\/b>2 are specified, all unpairable lines shall be output.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p><b>\u2212e\u00a0<\/b><i>string<\/i><\/p>\n<\/td>\n<td width=\"1%\"><\/td>\n<td width=\"74%\">\n<p>Replace empty output fields in the list selected by <b>\u2212o<\/b> with the string <i>string<\/i>.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p><b>\u2212o\u00a0<\/b><i>list<\/i><\/p>\n<\/td>\n<td width=\"1%\"><\/td>\n<td width=\"74%\">\n<p>Construct the output line to comprise the fields specified in <i>list<\/i>, each element of which shall have one of the following two forms:<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:26%;\">1.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"28%\"><\/td>\n<td width=\"3%\"><\/td>\n<td width=\"1%\"><\/td>\n<td width=\"68%\">\n<p style=\"margin-top: 1em\"><i>file_number.field<\/i>, where <i>file_number<\/i> is a file number and <i>field<\/i> is a decimal integer field number<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"28%\"><\/td>\n<td width=\"3%\">\n<p>2.<\/p>\n<\/td>\n<td width=\"1%\"><\/td>\n<td width=\"68%\">\n<p>0 (zero), representing the join field<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:26%; margin-top: 1em\">The elements of <i>list<\/i> shall be either <comma>-separated or <blank>-separated, as specified in Guideline 8 of the Base Definitions volume of POSIX.1-2017, <i>Section 12.2<\/i>, <i>Utility Syntax Guidelines<\/i>. The fields specified by <i>list<\/i> shall be written for all selected output lines. Fields selected by <i>list<\/i> that do not appear in the input shall be treated as empty output fields. (See the <b>\u2212e<\/b> option.) Only specifically requested fields shall be written. The application shall ensure that <i>list<\/i> is a single command line argument.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"11%\">\n<p style=\"margin-top: 1em\"><b>\u2212t\u00a0<\/b><i>char<\/i><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"74%\">\n<p style=\"margin-top: 1em\">Use character <i>char<\/i> as a separator, for both input and output. Every appearance of <i>char<\/i> in a line shall be significant. When this option is specified, the collating sequence shall be the same as <i>sort<\/i> without the <b>\u2212b<\/b> option.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>\u2212v\u00a0<\/b><i>file_number<\/i><\/p>\n<p style=\"margin-left:26%;\">Instead of the default output, produce a line only for each unpairable line in <i>file_number<\/i>, where <i>file_number<\/i> is 1 or 2. If both <b>\u2212v<\/b>1 and <b>\u2212v<\/b>2 are specified, all unpairable lines shall be output.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><b>\u22121\u00a0<\/b><i>field<\/i><\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"74%\">\n<p>Join on the <i>field<\/i>th field of file 1. Fields are decimal integers starting with 1.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><b>\u22122\u00a0<\/b><i>field<\/i><\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"74%\">\n<p>Join on the <i>field<\/i>th field of file 2. Fields are decimal integers starting with 1.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>OPERANDS <a name=\"OPERANDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following operands shall be supported: <i><br \/> file1<\/i>,\u00a0<i>file2<\/i><\/p>\n<p style=\"margin-left:26%;\">A pathname of a file to be joined. If either of the <i>file1<\/i> or <i>file2<\/i> operands is <b>\u2019\u2212\u2019<\/b>, the standard input shall be used in its place.<\/p>\n<h2>STDIN <a name=\"STDIN\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The standard input shall be used only if the <i>file1<\/i> or <i>file2<\/i> operand is <b>\u2019\u2212\u2019<\/b>. See the INPUT FILES section.<\/p>\n<h2>INPUT FILES <a name=\"INPUT FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The input files shall be text files.<\/p>\n<h2>ENVIRONMENT VARIABLES <a name=\"ENVIRONMENT VARIABLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following environment variables shall affect the execution of <i>join<\/i>:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><i>LANG<\/i><\/p>\n<\/td>\n<td width=\"6%\"><\/td>\n<td width=\"74%\">\n<p>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of POSIX.1-2017, <i>Section 8.2<\/i>, <i>Internationalization Variables<\/i> for the precedence of internationalization variables used to determine the values of locale categories.)<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><i>LC_ALL<\/i><\/p>\n<\/td>\n<td width=\"6%\"><\/td>\n<td width=\"74%\">\n<p>If set to a non-empty string value, override the values of all the other internationalization variables.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><i>LC_COLLATE<\/i><\/p>\n<p style=\"margin-left:26%;\">Determine the locale of the collating sequence <i>join<\/i> expects to have been used when the input files were sorted.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><i>LC_CTYPE<\/i><\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"74%\">\n<p>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments and input files).<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><i>LC_MESSAGES<\/i><\/p>\n<p style=\"margin-left:26%;\">Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"11%\">\n<p><i>NLSPATH<\/i><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"74%\">\n<p>Determine the location of message catalogs for the processing of <i>LC_MESSAGES<\/i>.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>ASYNCHRONOUS EVENTS <a name=\"ASYNCHRONOUS EVENTS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Default.<\/p>\n<h2>STDOUT <a name=\"STDOUT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>join<\/i> utility output shall be a concatenation of selected character fields. When the <b>\u2212o<\/b> option is not specified, the output shall be:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">&#8220;%s%s%sn&#8221;, <<i>join field<\/i>>, <<i>other file1 fields<\/i>>, <br \/> <<i>other file2 fields<\/i>><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the join field is not the first field in a file, the <<i>other\u00a0file\u00a0fields<\/i>> for that file shall be:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><<i>fields preceding join field<\/i>>, <<i>fields following join field<\/i>><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">When the <b>\u2212o<\/b> option is specified, the output format shall be:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">&#8220;%sn&#8221;, <<i>concatenation of fields<\/i>><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">where the concatenation of fields is described by the <b>\u2212o<\/b> option, above.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">For either format, each field (except the last) shall be written with its trailing separator character. If the separator is the default (<blank> characters), a single <space> shall be written after each field (except the last).<\/p>\n<h2>STDERR <a name=\"STDERR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The standard error shall be used only for diagnostic messages.<\/p>\n<h2>OUTPUT FILES <a name=\"OUTPUT FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">None.<\/p>\n<h2>EXTENDED DESCRIPTION <a name=\"EXTENDED DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">None.<\/p>\n<h2>EXIT STATUS <a name=\"EXIT STATUS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following exit values shall be returned:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\">0<\/p>\n<\/td>\n<td width=\"6%\"><\/td>\n<td width=\"63%\">\n<p style=\"margin-top: 1em\">All input files were output successfully.<\/p>\n<\/td>\n<td width=\"17%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p>>0<\/p>\n<\/td>\n<td width=\"6%\"><\/td>\n<td width=\"63%\">\n<p>An error occurred.<\/p>\n<\/td>\n<td width=\"17%\"> <\/td>\n<\/tr>\n<\/table>\n<h2>CONSEQUENCES OF ERRORS <a name=\"CONSEQUENCES OF ERRORS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Default.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>The following sections are informative.<\/i><\/p>\n<h2>APPLICATION USAGE <a name=\"APPLICATION USAGE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Pathnames consisting of numeric digits or of the form <i>string.string<\/i> should not be specified directly following the <b>\u2212o<\/b> list.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the collating sequence of the current locale does not have a total ordering of all characters (see the Base Definitions volume of POSIX.1-2017, <i>Section 7.3.2<\/i>, <i>LC_COLLATE<\/i>), <i>join<\/i> treats fields that collate equally but are not identical as being the same. If this behavior is not desired, it can be avoided by forcing the use of the POSIX locale (although this means re-sorting the input files into the POSIX locale collating sequence.)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">When using <i>join<\/i> to process pathnames, it is recommended that LC_ALL, or at least LC_CTYPE and LC_COLLATE, are set to POSIX or C in the environment, since pathnames can contain byte sequences that do not form valid characters in some locales, in which case the utility\u2019s behavior would be undefined. In the POSIX locale each byte is a valid single-byte character, and therefore this problem is avoided.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>\u2212o<\/b> 0 field essentially selects the union of the join fields. For example, given file <b>phone<\/b>:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">!Name Phone Number <br \/> Don +1 123-456-7890 <br \/> Hal +1 234-567-8901 <br \/> Yasushi +2 345-678-9012<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">and file <b>fax<\/b>:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">!Name Fax Number <br \/> Don +1 123-456-7899 <br \/> Keith +1 456-789-0122 <br \/> Yasushi +2 345-678-9011<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">(where the large expanses of white space are meant to each represent a single <tab>), the command:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">join -t &#8220;<tab>&#8221; -a 1 -a 2 -e &#8216;(unknown)&#8217; -o 0,1.2,2.2 phone fax<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">(where <i><tab><\/i> is a literal <tab> character) would produce:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">!Name Phone Number Fax Number <br \/> Don +1 123-456-7890 +1 123-456-7899 <br \/> Hal +1 234-567-8901 (unknown) <br \/> Keith (unknown) +1 456-789-0122 <br \/> Yasushi +2 345-678-9012 +2 345-678-9011<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Multiple instances of the same key will produce combinatorial results. The following:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">fa: <br \/> a x <br \/> a y <br \/> a z <br \/> fb: <br \/> a p<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">will produce:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">a x p <br \/> a y p <br \/> a z p<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">And the following:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">fa: <br \/> a b c <br \/> a d e <br \/> fb: <br \/> a w x <br \/> a y z <br \/> a o p<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">will produce:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">a b c w x <br \/> a b c y z <br \/> a b c o p <br \/> a d e w x <br \/> a d e y z <br \/> a d e o p<\/p>\n<h2>RATIONALE <a name=\"RATIONALE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>\u2212e<\/b> option is only effective when used with <b>\u2212o<\/b> because, unless specific fields are identified using <b>\u2212o<\/b>, <i>join<\/i> is not aware of what fields might be empty. The exception to this is the join field, but identifying an empty join field with the <b>\u2212e<\/b> string is not historical practice and some scripts might break if this were changed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The 0 field in the <b>\u2212o<\/b> list was adopted from the Tenth Edition version of <i>join<\/i> to satisfy international objections that the <i>join<\/i> in the base documents for IEEE\u00a0Std 1003.2-1992 did not support the \u2018\u2018full join\u2019\u2019 or \u2018\u2018outer join\u2019\u2019 described in relational database literature. Although it has been possible to include a join field in the output (by default, or by field number using <b>\u2212o<\/b>), the join field could not be included for an unpaired line selected by <b>\u2212a<\/b>. The <b>\u2212o<\/b> 0 field essentially selects the union of the join fields.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This sort of outer join was not possible with the <i>join<\/i> commands in the base documents for IEEE\u00a0Std 1003.2-1992. The <b>\u2212o<\/b> 0 field was chosen because it is an upwards-compatible change for applications. An alternative was considered: have the join field represent the union of the fields in the files (where they are identical for matched lines, and one or both are null for unmatched lines). This was not adopted because it would break some historical applications.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The ability to specify <i>file2<\/i> as <b>\u2212<\/b> is not historical practice; it was added for completeness.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>\u2212v<\/b> option is not historical practice, but was considered necessary because it permitted the writing of <i>only<\/i> those lines that do not match on the join field, as opposed to the <b>\u2212a<\/b> option, which prints both lines that do and do not match. This additional facility is parallel with the <b>\u2212v<\/b> option of <i>grep<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Some historical implementations have been encountered where a blank line in one of the input files was considered to be the end of the file; the description in this volume of POSIX.1-2017 does not cite this as an allowable case.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Earlier versions of this standard allowed <b>\u2212j<\/b>, <b>\u2212j1<\/b>, <b>\u2212j2<\/b> options, and a form of the <b>\u2212o<\/b> option that allowed the <i>list<\/i> option-argument to be multiple arguments. These forms are no longer specified by POSIX.1-2008 but may be present in some implementations.<\/p>\n<h2>FUTURE DIRECTIONS <a name=\"FUTURE DIRECTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">None.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>awk<\/i>, <i>comm<\/i>, <i>sort<\/i>, <i>uniq<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The Base Definitions volume of POSIX.1-2017, <i>Section 7.3.2<\/i>, <i>LC_COLLATE<\/i>, <i>Chapter 8<\/i>, <i>Environment Variables<\/i>, <i>Section 12.2<\/i>, <i>Utility Syntax Guidelines<\/i><\/p>\n<h2>COPYRIGHT <a name=\"COPYRIGHT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology &#8212; Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http:\/\/www.opengroup.org\/unix\/online.html .<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https:\/\/www.kernel.org\/doc\/man-pages\/reporting_bugs.html .<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  join \u2014 relational database operator <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3782,1],"tags":[2661,2511],"class_list":["post-5971","post","type-post","status-publish","format-standard","hentry","category-1p-posix-comandos-generales","category-sin-categoria","tag-join","tag-man1p"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/5971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=5971"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/5971\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=5971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=5971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=5971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}