utility
join — external utility
Combines records whose selected keys match. Inputs normally must be sorted by join key under the same locale and separator rules. By default unmatched rows are omitted; -a includes unmatched records from the selected input. Duplicate keys may create multiple output pairs. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): a Ada 10.
Formal Syntax & Structure
bash syntaxbash
join [-1 FIELD] [-2 FIELD] [-t CHAR] FILE1 FILE2Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| FILE1 | path | First sorted input. |
| FILE2 | path | Second sorted input. |
Return Value
exit status
Zero on successful operation; nonzero on errors.
Working Example
Example Snippetbash
printf 'a Ada\nb Ben\n' > namesprintf 'a 10\nc 30\n' > scoresLC_ALL=C join names scores