zerofile.awk 424 B

12345678910111213141516171819
  1. # zerofile.awk --- library file to process empty input files
  2. #
  3. # Arnold Robbins, arnold@skeeve.com, Public Domain
  4. # June 2003
  5. BEGIN { Argind = 0 }
  6. ARGIND > Argind + 1 {
  7. for (Argind++; Argind < ARGIND; Argind++)
  8. zerofile(ARGV[Argind], Argind)
  9. }
  10. ARGIND != Argind { Argind = ARGIND }
  11. END {
  12. if (ARGIND > Argind)
  13. for (Argind++; Argind <= ARGIND; Argind++)
  14. zerofile(ARGV[Argind], Argind)
  15. }