home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / awk / awk320.zip / FILENAME.AWK < prev    next >
Text File  |  1990-06-13  |  458b  |  17 lines

  1. # Date: 06-03-90  19:07
  2. # From: Herb Martin
  3. # To:   Rob Duff
  4. # Subj: comparison:sample
  5.  
  6. FNR < 3 {
  7.   # the output ALWAYS claims the filenames are equal AFTER the first
  8.   # file, even though the strings printed are DIFFERENT
  9.  
  10.   printf("FNR %d: [%14s]-[%14s]  ", FNR, lastfile, FILENAME) ;
  11.   if (lastfile != FILENAME) print "they are NOT equal"
  12.   else                      print "they are equal"
  13.   lastfile = FILENAME
  14. }
  15.  
  16. FNR == 3 { print "" }
  17.