home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gawk-2.15.6-base.tgz / gawk-2.15.6-base.tar / fsf / gawk / test / include.awk < prev    next >
Text File  |  1993-10-19  |  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.