Files and pipes
You can provide input to an
program by putting the input data into a file, say
and then executing
$ awk 'program' awkdata<<Return>>
If no filenames are given,
reads its standard input;
thus, a second common arrangement is to have another program
pipe its output into
selects input lines containing a specified regular expression,
but it can do so faster than
since this is the only thing it does.
We could, therefore, invoke the pipe
$ grep 'Asia' countries | awk '. . .'<<Return>>
quickly finds the lines containing
and passes them on to the
program for subsequent processing.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004