Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Program files z/OS UNIX System Services User's Guide SA23-2279-00 |
|
A program file is a text file that contains an awk program.
You can create program files with any text editor (such as ed).
For example, you might create a file named lbprog.awk that
contains the lines:
To execute a program on a particular
data file, use the command:
where progfile is the name
of the file that contains the awk program, and datafile is the name of the data file. For example:
runs
the program in lbprog.awk on the data in hobbies.If the data file does not use the default separator characters,
you must specify a –F option after the progfile name,
as in:
To gain some experience using awk, you can test the examples on the hobbies file. Run some from the command line and some from program files. |
Copyright IBM Corporation 1990, 2014
|