Date: December 8, 2000
One way to capture the results of multiple commands in a file would be:
cmd1 > $results cmd2 >> $results : cmdN >> $results
Another way would be to use the Korn shell "grouping" syntax, which we could use to rewrite the above as:
( cmd1 cmd2 : cmdN ) > $results
The grouping technique has several advantages, including less typing, reduced I/O overhead (N file opens vs 1 file open), and less chance of typos such as using a ">" that erases all the accumulated data in the file.
Bruce Spencer,
baspence@us.ibm.com
December 8, 2000