home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / a / bin / gawk-2.15 / gawk-2 / gawk-2.15.6 / test / include.awk < prev    next >
Encoding:
Text File  |  1993-10-19  |  278 b   |  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.