ftrans.awk 315 B

123456789101112131415
  1. # ftrans.awk --- handle datafile transitions
  2. #
  3. # user supplies beginfile() and endfile() functions
  4. #
  5. # Arnold Robbins, arnold@skeeve.com, Public Domain
  6. # November 1992
  7. FNR == 1 {
  8. if (_filename_ != "")
  9. endfile(_filename_)
  10. _filename_ = FILENAME
  11. beginfile(FILENAME)
  12. }
  13. END { endfile(_filename_) }