column [options] list
Selects columns by name (and order) and outputs an rdbtable with these columns. Can effectively select, order, add, delete, or duplicate columns.
The value 'list' is normally a list of column names. If 'list' contains a triplicate of the form '-c NAME NEW' then column name 'NAME' will be changed to 'NEW'. If 'list' contains a triplicate of the form '-a NAME DEFN' then a new (null) column is added, at that point in the list of column names, with name 'NAME' and definition 'DEFN'.
This RDB operator reads an rdbtable from STDIN and writes an rdbtable to STDOUT. Options may be abbreviated.
Options:
As an example using the sample rdbtable from the DATA section (named sample), to select columns named 'NAME' and 'COUNT' the command would be:
column NAME COUNT < sample
To select all columns except column 'NAME' the command would be:
column -v NAME < sample
To add a new column named 'LENGTH' with a size of 10 the command would
be:
column -v -a LENGTH 10 < sample
Note that to include documentation with the new column definition the
command would be:
column -v -a LENGTH '10 length in meters' < sample
The '10 length in meters' must be quoted so that it will be treated as
a single token.