mergekeys(1)

NAME

mergekeys - merges two sorted flat files with some different columns

SYNOPSIS

mergekeys  [-hVvaAbBirlDdo] file1 file2

DESCRIPTION
merges two sorted flat files with some different columns

-h  --help
    print this message and exit

-V  --version
    print version info and exit

-v  --verbose
    print verbose messages during execution

-a left_keys   --left-keys=left_keys
    list of key fields in left-hand file

-A left_key_labels   --left-labels=left_key_labels
    list of key labels in left-hand file

-b right_keys   --right-keys=right_keys
    list of key fields in right-hand file

-B right_key_labels   --right-labels=right_key_labels
    list of key labels in right-hand file

-i  --inner
    inner join - i.e. drop lines that do not have a match in both files

-r  --right
    right outer join - i.e. drop lines in the first file that do not have a match in the second file

-l  --left
    left outer join - i.e. drop lines in the second file that do not have a match in the first file

-D merge_default   --default=merge_default
    for outer joins, the defaut value to put in unmatched merge fields

-d delim   --delim=delim
    delimiting string for both input files

-o outfile   --outfile=outfile
    name of file for output

Input files must be sorted by key fields.

If -a and -b are not specified, the first line of each file will be examined to determine common fields.  In this case, all key fields must precede all mergeable fields.  A header line in each file is required in either case.

AUTHOR

Written by the maintainers and contributers of CRUSH tools.  See
    http://code.google.com/p/crush-tools

REPORTING BUGS

Report bugs to <crush-tools@googlegroups.com>, or visit
    http://groups.google.com/group/crush-tools

COPYRIGHT
   Copyright 2008 Google Inc.
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
       http://www.apache.org/licenses/LICENSE-2.0
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.