Shell commands can also be instantiated in the report form, and their output will be printed on the report. and they can use column data as arguments.
If a column name is not recognized, <column name> is treated as normal text. This allows the use of angle brackets in the form: as long as the words between them do not match a column name, they will not be replaced.
If the data from the table is not replacing <column name>, then column name does not exactly match the column name in the table. Check for spelling errors, upper and lower case discrepancies, embedded blanks, and nonprinting characters.
$ justify < eats Last First Dive City ------ ------- --------------- --------- Tong Francis Szechwan Heaven St. Cloud Moreno Esteban Tacos Morenos Gilroy$ cat eats.bid <First> <Last> <! padstring -50 '<Dive> of <City>' !> <! date +%m/%d/%y !> Dear Chef <Last>: We would like you to cater our Labor Day Picnic, where we expect to feed 4 adults, 8 kids, 7 cats, 2 horses and a plethora of ants, fleas and gnats. We are also soliciting a bid from <! prompt `row 'Dive != "<Dive>"' < eats | column Dive | headoff` !>.
$ report eats.bid < eats Francis Tong Szechwan Heaven of St. Cloud 09/01/92
Dear Chef Tong: We would like you to cater our Labor Day Picnic, where we expect to feed 4 adults, 8 kids, 7 cats, 2 horses and a plethora of ants, fleas and gnats. We are also soliciting a bid from Tacos Morenos.
Esteban Moreno Tacos Morenos of Gilroy 09/01/92
Dear Chef Moreno: We would like you to cater our Labor Day Picnic, where we expect to feed 4 adults, 8 kids, 7 cats, 2 horses and a plethora of ants, fleas and gnats. We are also soliciting a bid from Szechwan Heaven.
This example illustrates the three types of inserts:
column name, command, and command insert.
The
prompt
command is used to suppress the extra newline returned by the shell.