Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
The awk command line z/OS UNIX System Services User's Guide SA23-2279-00 |
|
The simplest awk command line is:
The awk program
is enclosed in single-quote or apostrophe (') characters.
The datafile argument gives the name of
the data file. For example:
executes
the program:
on the data file hobbies.If you are using the z/OS® shell,
you can type in a multiline program within single quotation marks,
as in:
awk assumes that blanks or horizontal
tabs separate fields in a record. If the data file uses different
field separator characters, you must indicate this on the command
line. You can do this with an option of the form:
where string lists
the characters used to separate fields. For example:
indicates
that the given data file uses colon (:) characters
to separate record fields. The –F option
must come before the quoted program instructions.awk also allows you to define the value of variables on the command line by using the –v option. See z/OS UNIX System Services Command Reference for details. |
Copyright IBM Corporation 1990, 2014
|