The awk class action script is executed automatically at installation if a file belonging to class awk exists. Such a file contains instructions for the awk class script in the format shown in the figure below.
# comment, which may appear on any line in the file !install # awk(1) program to install changes . . . (awk program) !remove # awk1(1) program to remove changes . . . (awk program)
Two commands indicate when instructions should be executed. The awk instructions that follow the !install command are executed during package installation, and those that follow the !remove command are executed during package removal. It does not matter in which order these commands are used in the file.
The name of the awk class action script should be the same as the name of the file on which the instructions will be executed.
The file to be modified is used as input to awk and the output of the script ultimately replaces the original object. Environment variables may not be passed to the awk command with this syntax.
For more information on awk instructions, see awk(1).