Classic Shell Scripting by Arnold Robbins & Nelson H. F. Beebe

Classic Shell Scripting by Arnold Robbins & Nelson H. F. Beebe

Author:Arnold Robbins & Nelson H. F. Beebe
Language: eng
Format: mobi, epub, pdf
Tags: COMPUTERS / Operating Systems / UNIX
ISBN: 9780596159498
Publisher: O'Reilly Media
Published: 2008-12-17T02:00:00+00:00


Actions

We have now covered most of the awk language elements needed to select records. The action section that optionally follows a pattern is, well, where the action is: it specifies how to process the record.

awk has several statement types that allow construction of arbitrary programs. However, we delay presentation of most of them until Section 9.7. For now, apart from the assignment statement, we consider only the simple print statement.

In its simplest form, a bare print means to print the current input record ($0) on standard output, followed by the value of the output record separator, ORS, which is by default a single newline character. These programs are therefore equivalent:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.