PIRDE deal

DOC DATE

April Fools Day 1989, cLIeNUcized June 2000

NAME

deal - output columns from table

SYNOPSIS

deal columns [ < data ]

DESCRIPTION

deal reads columnar data from the standard input and outputs the named columns.

This is best explained by way of an example. Suppose the file data contains the lines:

xcol    y       z       v       u       w       i
----    -       -       -       -       -       -
0       1       2       3       4       *       6
1       2       3       4       5       **      7
2       3       4       5       6       ***     8
3       4       5       6       7       v       9
4       5       6       7       8       vi      10
where exactly one tab-character separates the columns.

The command deal y v xcol < data yields

y       v       xcol
-       -       ----
1       3       0
1       2       3
2       3       4
3       4       5
4       5       6
on the standard output.

deal is typically used with other reldb commands such as select, in which case the output from one command is piped into another.

SEE ALSO

reldb(P)

BUGS

deal uses a fixed size matrix for storing column names. This will overflow when too many names are given on the command line. No warning is given.