Because logical conditions are represented by special characters, they must be enclosed by single quotes (') to protect the condition from being interpreted by the shell. The row, compute and validate commands recognize column names as upper and lower case letters, numbers, and underscores (_). Any other characters should be surrounded by quotes.
row is a preprocessor for the UNIX awk program. The advantage of row over awk is that row knows about the names of the columns. After row parses the conditional expressons and substitutes the column offsets for column name, it executes the program defined by $AWK, or `/bin/awk' if $AWK is not defined.
The following list of words are understood by awk and should not be used in column names: BEGIN, END, break, continue, else, exit, exp, for, getline, if, in, index, int, length, log, next, print, printf, split, sprintf, sqrt, substr and while.
$ cat inventory Item Onhand Cost Value Description ---- ------ ---- ----- ----------- 1 4 50 150 rubber gloves 2 100 5 500 test tubes 3 5 80 400 clamps 6 89 147 13083 bunsen burners 7 5 175 875 scales$ row 'Cost > 50' < inventory Item Onhand Cost Value Description ---- ------ ---- ----- ----------- 3 5 80 400 cloth gloves 6 89 147 13083 bunsen burners 7 5 175 875 scales
Let's get all the burners and all of the items that we have less than 5 of, type:
$ row 'Description ~ /burner/ || Onhand < 5' < inventory Item Onhand Cost Value Description ---- ------ ---- ----- ----------- 1 4 50 150 rubber gloves 6 89 147 13083 bunsen burners
The "`~ /burner/'" is a search for the string burner anywhere in the Description column. AKA