www.delorie.com/gnu/docs/gawk/gawk_99.html   search  
 
Buy the book!


The GNU Awk User's Guide

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.1.4 The BEGIN and END Special Patterns

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

7.1.4.1 Startup and Cleanup Actions  How and why to use BEGIN/END rules.
7.1.4.2 Input/Output from BEGIN and END Rules  I/O issues in BEGIN/END rules.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003