home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / gnu / gawk-2.15.5-src.lha / gawk-2.15.5 / test / include.awk < prev    next >
Text File  |  1993-10-20  |  278b  |  14 lines

  1. # input file should have lines which start with "@incl" followed by
  2. # a name of a file to include
  3. {
  4.     if ((NF == 2) && ($1 == "@incl")) {
  5.         print "  -- included file --  ", $2
  6.         while ((getline line < $2) > 0)
  7.             print line
  8.         close ($2)
  9.         printf "\t***\n"
  10.     } else {
  11.         print
  12.     }
  13. }
  14.