Команда join

The join command forms, on the standard output, a join of the two relations specified by the lines of file1 and file2.

Синтаксис

join [-a filenumber | -v filenumber ] [ -1 fieldnumber ] [ -2 fieldnumber ] [ -o list ] [ -e string ] [ -t char ] file1 file2

join [ -a filenumber ] [ -j fieldnumber ] [-j1 fieldnumber ] [ -j2 fieldnumber ] [ -o list ] [-e string ] [ -t char ] file1 file2

-a filenumberIn addition to the normal output, produce a line for each unpairable line in file filenumber, where filenumber is 1 or 2. If both -a 1 and -a 2 are specified, all unpairable lines will be output.
-v filenumberInstead of the default output, produce a line only for each unpairable line in filenumber, where filenumber is 1 or 2. If both -v 1 and -v 2 are specified, all unpairable lines will be output.
-l fieldnumberJoin on the fieldnumberth field of file 1 . Fields are decimal integers starting with 1.
-2 fieldnumberJoin on the fieldnumberth field of file 2. Fields are decimal integers starting with 1.
-j fieldnumberEquivalent to -1fieldnumber -2fieldnumber.
-j1 fieldnumberEquivalent to -1fieldnumber.
-j2 fieldnumberEquivalent to -2fieldnumber Fields are numbered starting with 1.
-o listEach output line includes the fields specified in list. Fields selected by list that do not appear in the input will be treated as empty output fields. (See the -e option.) Each element of which has the either the form filenumber.fieldnumber, or 0, which represents the join field. The common field is not printed unless specifically requested.
-e stringReplace empty output fields with string.
-t charUse character char as a separator. Every appearance of char in a line is significant. The character char is used as the field separator for both input and output. With this option specified, the collating term should be the same as sort without the -b option.
file1

file2

File name and/or Directory and file name of the files being joined

Обратно к списку команд




Комфортно! Помогу взять кредит доска объявлений. Акция