home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 December (Special) / PCWorld_2005-12_Special_cd.bin / Bezpecnost / lsti / lsti.exe / framework-2.5.exe / nextfile.awk < prev    next >
Text File  |  2004-08-02  |  383b  |  17 lines

  1. # nextfile --- skip remaining records in current file
  2. # correctly handle successive occurrences of the same file
  3. #
  4. # Arnold Robbins, arnold@gnu.org, Public Domain
  5. # May, 1993
  6.  
  7. # this should be read in before the "main" awk program
  8.  
  9. function nextfile()   { _abandon_ = FILENAME; next }
  10.  
  11. _abandon_ == FILENAME {
  12.       if (FNR == 1)
  13.           _abandon_ = ""
  14.       else
  15.           next
  16. }
  17.