1 2 3 4 5 6 7 8 9 10 11 12
#! /usr/bin/awk -f BEGIN { getline # print ("FILENAME =", FILENAME) > "/dev/stderr" #Rewind the file if (close(FILENAME)) { print "Error " ERRNO " closing input file" > "/dev/stderr"; exit; } } { print "Analysing ", $0 }