NAME

rdbcat - concatenate RDB files


SYNTAX

rdbcat [options] files


OPTIONS

Options may be abbreviated. Options which take values may be separated from the values by white space or a = character.

--help
print a help message and exit.

--version
Print version information and exit.

--file
a new column will be created which will contain the name of the input file. The name of the column is determined by the --col option, if specified, else it will be filename. If a column of that name exists in the input data, it will refuse to continue.

--col column name
The name of the column for the --file option. Defaults to filename

--fix
This indicates that rdbcat should create dummy entries (or remove entries) in rows in the second and subsequent tables to match the column structure in the first table.

--hdrvar variable list
This option indicates that columns should be created for the specified header variables. The columns will be set to the value of the variables. The variable list is a comma seperated list. The option may be repeated.

--hdrvars_all
This option indicates that columns should be created for all variables in the header.


DESCRIPTION

rdbcat concatenates RDB files. The first file that it reads is used as a template; all other files must have the same columns as the first (unless the --fix option is specified). The column types must agree, but they need not be in the same order. The concatenated mess is written to the UNIX standard output stream. Comments in the template file are preserved; they are discarded in the following files.

rdbcat can create columns in the output file containing the values of header variables (the column will be eponomyously named). Each input RDB file should have all of the variables, unless the --fix option is specified.

Unlike most RDB programs, rdbcat does not operate on the UNIX standard input stream by default. To specify standard input, use a filename of either the string `stdin' or `-'. You'll have to precede the `-' with a `--' to indicate that it's not another option, i.e.

  rdbcat -- - foo.rdb

Examples

Given foo1.rdb,

            Name    Address Zip
            S       S       N
            me      here    20
            you     there   30

and foo2.rdb.

            Name    Zip     Address
            S       N       S
            they    3       there
            he      2       where

The result of

    rdbcat foo1.rdb foo2.rdb

is

            Name    Address Zip
            S       S       N
            me      here    20
            you     there   30
            they    there   3
            he      where   2

The result of

  rdbcat -f foo1.rdb foo2.rdb

is

            filename        Name    Address Zip
            S       S       S       N
            foo1.rdb        me      here    20
            foo1.rdb        you     there   30
            foo2.rdb        they    there   3
            foo2.rdb        he      where   2


AUTHOR

Diab Jerius ( djerius@cfa.harvard.edu )


VERSION

$Revision: 1.15 $ $Date: 2001/02/09 20:11:06 $