NAME

row - extract rows from an /rdb file


SYNOPSIS

row [options] expression


OPTIONS

-help
Print this help information.

-fXXX
The expression is in the file XXX, instead of on the command line. The advantage in this case is that no quoting of chars that might be special to the UNIX shell is necessary.

-d column[,def]
override the column type definition for column in the rdb file, setting it to def, if specified, or the opposite of the current definition, if def is not specified.

-x
Print out the Perl script which will be eval'd.


DESCRIPTION

Selects rows from the input rdbtable based on an arbitrary expression using column names. Characters that are special to the UNIX shell must be quoted.

This operator reads an rdbtable via STDIN and writes an rdbtable via STDOUT. Options may be abbreviated.

As an example using the sample rdbtable from the DATA section (named sample), to select rows that have the NAME column equal to 'Hansen' the command would be:

        row  NAME  eq  Hansen  <  sample

which would produce:

        NAME    COUNT   TYP     AMT     OTHER   RIGHT 
        6       5N      4       5N      8       8>
        Hansen  44      A       23      One     Is

to select rows that have the TYP column equal to 'A' or that have the AMT column greater than 1000 the command would be:

        row  TYP  eq  A  or  AMT  gt  1000  <  sample

producing:

        NAME    COUNT   TYP     AMT     OTHER   RIGHT
        6       5N      4       5N      8       8>
        Bush    44      A       133     Another This
        Hansen  44      A       23      One     Is
        Hart    77      D       1111    So      Right
        Holmes  65      D       1111    On      Edge

Expressions

See the rdb_expr document for information on how to specify expressions.


AUTHOR

Original by Walter V. Hobbs. Rewritten by Diab Jerius


VERSION

$Revision: 1.14 $ $Date: 2001/02/09 20:11:07 $