AWK
Key
[x]
: x is present 0 or 1 timesx...
: x is present 1 or more timesx || y
: x or y is present[x || y]
: (x or y) is present 0 or 1 times
Usage
Grammar
For each line in inputFile
that satisfies <condition1>
, execute <action1>
. For each line that satisfies <condition2>
, execute <action2>
, etc... If one line satisfies both <condition1>
AND <condition2>
, execute <action1>
AND <action2>
.
<field>
's are the fields created when we split each line on the field separator fs
. The first field has the name $1
, the second $2
etc... $0
is the original, unsplit line
Last updated
Was this helpful?