GSP-Agent-Windows/OGP64/usr/share/awk/zerofile.awk

25 lines
611 B
Awk

# zerofile.awk --- library file to process empty input files
#
# user supplies zerofile() function
#
# This file and how to use it are described in the manual.
# Therefore, we respectfully advise you to Read The Fine Manual
# for more information.
#
# Arnold Robbins, arnold@skeeve.com, Public Domain
# June 2003
BEGIN { Argind = 0 }
ARGIND > Argind + 1 {
for (Argind++; Argind < ARGIND; Argind++)
zerofile(ARGV[Argind], Argind)
}
ARGIND != Argind { Argind = ARGIND }
END {
if (ARGIND > Argind)
for (Argind++; Argind <= ARGIND; Argind++)
zerofile(ARGV[Argind], Argind)
}