ubuntu-buildroot/output/build/host-gawk-5.2.0/awklib/eg/lib/zerofile.awk

20 lines
424 B
Awk
Raw Normal View History

2024-04-01 15:19:46 +00:00
# zerofile.awk --- library file to process empty input files
#
# 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)
}