[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The rule of using '{}' (awk)
From: |
Andreas Schwab |
Subject: |
Re: The rule of using '{}' (awk) |
Date: |
Fri, 21 Aug 2009 17:42:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Peng Yu <address@hidden> writes:
> I get the following syntax error. The error is fixed if I remove the
> out most '{}'. I am wondering what the rule is to use '{}' in awk.,
How about reading the fine manual.
Syntactically, a rule consists of a pattern followed by an action.
The action is enclosed in curly braces to separate it from the pattern.
Newlines usually separate rules. Therefore, an `awk' program looks
like this:
PATTERN { ACTION }
PATTERN { ACTION }
...
Andreas.
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."