请输入您要查询的百科知识:

 

词条 Join (Unix)
释义

  1. Overview

  2. History

  3. See also

  4. References

  5. External links

{{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 =
| operating system = Unix and Unix-like
| genre = Command
| license = coreutils: GNU GPL v3
| website =
}}

join is a command in Unix and Unix-like operating systems that merges the lines of two sorted text files based on the presence of a common field. It is similar to the join operator used in relational databases but operating on text files.

Overview

The join command takes as input two text files and a number of 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 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 printing using 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:

Indeed, only "george" is common as a first word of both files.

History

The version of join bundled in GNU coreutils was written by Mike Haertel.[1]

See also

  • Textutils
  • Join (SQL)
  • Relational algebra
  • List of Unix commands

References

1. ^https://linux.die.net/man/1/join

External links

  • man page
  • join command
{{Unix commands}}{{unix-stub}}

2 : Unix text processing utilities|Unix SUS2008 utilities

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/12 21:00:08