This
is almost exactly gnu textutils 2.0 join, with one bug fix so
it doesn't eat many extra gigabytes of RAM needlessly in certain
cases.
Usage: av_join [OPTION]... FILE1 FILE2
For each
pair of input lines with identical join fields, write a line
to standard output. The default join field is the first, delimited
by whitespace. When FILE1 or FILE2 (not both) is -, read standard
input.
-a SIDE
print unpairable lines coming from file SIDE
-e EMPTY replace missing input fields with EMPTY
-i, --ignore-case ignore differences in case when comparing
fields
-o FORMAT obey FORMAT while constructing output line
-p if one field is a prefix of the other, count that as a
match
-t CHAR use CHAR as input and output field separator
-T CHAR use CHAR as output field separator
-v SIDE like -a SIDE, but suppress joined output lines
-x FILE like -a 1, but send unpairable lines to FILE
-y FILE like -a 2, but send unpairable lines to FILE
-1 FIELD join on this FIELD of file 1
-2 FIELD join on this FIELD of file 2
--help display this help and exit
--version output version information and exit
Unless
-t CHAR is given, leading blanks separate fields and are ignored,
else fields are separated by CHAR. Any FIELD is a field number
counted from 1. FORMAT is one or more comma or blank separated
specifications, each being `SIDE.FIELD' or `0'. Default FORMAT
outputs the join field, the remaining fields from FILE1, the
remaining fields from FILE2, all separated by CHAR.
|