Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Join (Unix)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Command in Unix-like operating systems}} {{lowercase}} {{Infobox software | name = join | logo = | screenshot = | screenshot size = | caption = | author = [[Douglas McIlroy]] | developer = [[AT&T Bell Laboratories]] | released = {{Start date and age|1979|1}} | latest release version = | latest release date = | programming language = [[C (programming language)|C]] | operating system = [[Unix]], [[Unix-like]], [[Plan 9 from Bell Labs|Plan 9]] | platform = [[Cross-platform]] | genre = [[Command (computing)|Command]] | license = [[coreutils]]: [[GPLv3+]]<br />Plan 9: [[MIT License]] | website = }} '''<code>join</code>''' is a command in [[Unix]] and [[Unix-like]] [[operating system]]s that merges the lines of two sorted [[text file]]s based on the presence of a common [[Field (computer science)|field]]. It is similar to the join operator used in [[relational database]]s but operating on text files. ==Overview== The <code>join</code> command takes as input two text files and several options. If no [[command-line argument]] is given, this command looks for a pair of lines from the two files having the same first field (a sequence of characters that are different from space), and outputs a line composed of the first field followed by the rest of the two lines. The program arguments specify which [[character (computing)|character]] to be used in place of space to separate the fields of the line, which field to use when looking for matching lines, and whether to output lines that do not match. The output can be stored to another file rather than printed using [[Redirection (computing)|redirection]]. As an example, the two following files list the known fathers and the mothers of some people. Both files have been sorted on the join field β this is a requirement of the program. george jim kumar gunaware albert martha george sophie The join of these two files (with no argument) would produce: george jim sophie Indeed, only "george" is common as a first word of both files. ==History== {{code|join}} is intended to be a relation database operator. It is part of the [[X/Open]] Portability Guide since issue 2 of 1987. It was inherited into the first version of POSIX.1 and the [[Single Unix Specification]].<ref>{{man|cu|printf|SUS}}</ref><ref>{{man|1|printf|FreeBSD}}</ref> The version of <code>join</code> bundled in [[GNU]] [[coreutils]] was written by Mike Haertel.<ref>{{man|1|join|ManKier}}</ref> The command is available as a separate package for [[Microsoft Windows]] as part of the [[UnxUtils]] collection of [[Native (computing)|native]] [[Windows API|Win32]] [[porting|ports]] of common GNU Unix-like utilities.<ref>{{Cite web|url=http://unxutils.sourceforge.net/|title=Native Win32 ports of some GNU utilities|website=unxutils.sourceforge.net}}</ref> ==See also== * [[Textutils]] * [[Join (SQL)]] * [[Relational algebra]] * [[List of Unix commands]] ==References== {{Reflist}} ==External links== {{Wikibooks|Guide to Unix|Commands}} * {{man|1|join|Plan 9}} * {{man|1|join|die.net}} * [http://www.theunixschool.com/2012/01/join-command.html join command] {{Unix commands}} {{Plan 9 commands}} {{Core Utilities commands}} [[Category:Unix text processing utilities]] [[Category:Unix SUS2008 utilities]] [[Category:Plan 9 commands]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite web
(
edit
)
Template:Code
(
edit
)
Template:Core Utilities commands
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Lowercase
(
edit
)
Template:Main other
(
edit
)
Template:Man
(
edit
)
Template:Plan 9 commands
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Sister project
(
edit
)
Template:Template other
(
edit
)
Template:Unix commands
(
edit
)
Template:Wikibooks
(
edit
)