The functions BEGIN and END are executed as early and as late as possible:
BEGIN { print " in the beginning \n"; } END { print " this is the end \n"; } print "hello world \n";