gawk: BEGIN/END

1 
1 7.1.4 The 'BEGIN' and 'END' Special Patterns
1 --------------------------------------------
1 
1 All the patterns described so far are for matching input records.  The
1 'BEGIN' and 'END' special patterns are different.  They supply startup
1 and cleanup actions for 'awk' programs.  'BEGIN' and 'END' rules must
1 have actions; there is no default action for these rules because there
1 is no current record when they run.  'BEGIN' and 'END' rules are often
1 referred to as "'BEGIN' and 'END' blocks" by longtime 'awk' programmers.
1 

Menu