home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / awk / awk320.zip / REOPEN.AWK < prev    next >
Text File  |  1989-05-14  |  516b  |  17 lines

  1. # Date:  04-12-89  11:24
  2. # From:  Jeff Clough
  3. # To:    Rob Duff
  4. # Subj:  Bug (I think) in AWK 2.12
  5.  
  6. #      The AWK documentation implied that I could write to a file and then use 
  7. # that same file for input provided that I closed the file first. When I tried 
  8. # to do this, I found that the file was erase as it was opened the second time 
  9. # (for input). 
  10.  
  11. BEGIN {
  12.     print "This is not a test, this is ROCK AND ROLL." > "reopen.dat"
  13.     close ("reopen.dat");
  14.     getline < "reopen.dat"
  15.     print
  16. }
  17.