row - extract rows from an /rdb file
row [options] expression
eval'd.
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
See the rdb_expr document for information on how to specify expressions.
Original by Walter V. Hobbs. Rewritten by Diab Jerius
$Revision: 1.14 $ $Date: 2001/02/09 20:11:07 $