JOIN(1)
π join(1) β the manual page, but make it a group chat π
okay bestie so you're in the General Commands Manual and the command is join. and like. she's iconic. she takes two files and matches up lines that share the same join field, and then writes the matching pairs to standard output. the default join field? it's the first field, and it's delimited by blanks. no cap. β¨
and also, super important: if FILE1 or FILE2 β but not both, okay?? β is -, then she reads from standard input. π«Ά
π SYNOPSIS π
join [OPTION]... FILE1 FILE2
π DESCRIPTION π
so here's the vibe fr fr: for every single pair of input lines that have identical join fields, she writes a line to standard output. that's it. that's the whole thing. π
the default join field is the first one, and it's delimited by blanks.
and when FILE1 or FILE2 (again β not both, we don't do that here) is -, she reads standard input instead. πΈ
π OPTIONS π
-a<FILENUM> β also print the unpairable lines from fileFILENUM, whereFILENUMis1or2, matching up toFILE1orFILE2respectively. possible values are right here:12
-v<FILENUM> β same energy as-a FILENUM, except she suppresses the joined output lines. so you only get the lonely ones. π possible values:12
-e<EMPTY> β replace any missing input fields withEMPTY. fill in the blanks, literally π-i,--ignore-caseβ ignore differences in case when comparing fields. capital letters are NOT the drama here, bestie. β¨-j<FIELD> β equivalent to-1 FIELD -2 FIELD. two-for-one deal, she ate that. π₯-o<FORMAT> β obeyFORMATwhile constructing the output line. you pick the shape, she delivers. π-t<CHAR> β useCHARas both the input and output field separator. π₯-1<FIELD> β join on thisFIELDof file 1-2<FIELD> β join on thisFIELDof file 2--check-orderβ check that the input is correctly sorted, even if literally every single input line is pairable. like, she's checking anyway, periodt.--nocheck-orderβ do not check that the input is correctly sorted. not her business, not her problem. π--headerβ treat the first line in each file as field headers, and print them without trying to pair them. main character energy for the header row. π-z,--zero-terminatedβ line delimiter isNUL, not newline. feral, but valid. π¦-h,--helpβ print help-V,--versionβ print version
β VERSION β
v(uutils coreutils) 0.12.0
πΈ EXAMPLES πΈ
join two files on the first (default) field:
join path/to/file1 path/to/file2
join two files using a comma (instead of a space) as the field separator:
join -t ',' path/to/file1 path/to/file2
join field3 of file1 with field1 of file2:
join -1 3 -2 1 path/to/file1 path/to/file2
produce a line for each unpairable line for file1:
join -a 1 path/to/file1 path/to/file2
join a file from stdin:
cat path/to/file1 | join - path/to/file2
okay so these examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. and heads up bestie: since uutils is a work in progress, some of these examples might fail. π not her fault, she's still growing. π±
and that's the whole page!! π«Ά this one's dated 2026-09-25, and it's from uutils coreutils, version v(uutils coreutils) 0.12.0 β go match some fields, you're gonna slay πβ¨π
π¦ where this page comes from
- ubuntu stonking: rust-coreutils 0.12.0-1ubuntu2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms