User's manual. Section 1.

JN(1): join fields


USAGE

DESCRIPTION

Jn joins the lines in input files. Each line is considered as a record, with field numbers counting from 1. The join combines records with the same key in all files. If a key is found in one file, a line is generated for it even if it is not found in any other file. Files need not to be sorted. By default, the first field is used as the key. Flags -k1 and -k2 can be used to set a different key for the first file and for all other files.

By default the field separator is a run of blanks. Flag -F changes the set of runes used as field separators to its argument.

Flag -1 indicates that fields are separated exactly by one instance of the separator string. Such string defaults to a tabulator character in this case, unless -F says otherwise.

The output is printed sorted on the key field. Output fields are separated by default using a tab character or the sep string if -1 is used.

EXAMPLES

Join the lines of ids and all grade files using the first field in ids and the second in others. Generate output fields separated by a : character:

SOURCE

SEE ALSO


User's manual. Section 1.