awk Examples
[Overview]

awk Examples

gawk - pattern scanning and processing language

gawk [ POSIX or GNU style options ] -f program-file [ -- ] file ...
gawk [ POSIX or GNU style options ] [ -- ] program-text file ...

-f program-file
-F field separator (FS)
-v var=val Assign the value val to the variable var, before execution of the program begins. Such variable values are available to the BEGIN rule of an AWK program.

Patterns
   AWK patterns may be one of the following:

      BEGIN
      END
      BEGINFILE
      ENDFILE
      /regular expression/
      relational expression
      pattern && pattern
      pattern || pattern
      pattern ? pattern : pattern
      (pattern)
      ! pattern
      pattern1, pattern2
for further information see the manual pages awk(1)


all examples assembled by andreas schmidt for the IC3K 2022 conference