in reply to What if FILE deleted during WHILE read-in loop?
On unix, nothing. The file isn't deleted until all file handles to it are closed. Until then, removing the file only removes the entry in the directory, not the file itself.
Of course, it's a different story if another program alters the contents of the file or changes its size. That would affect your script, because it is indeed read into memory a bit at a time. (It's buffered, so it's actually more than one line at a time.)
|
|---|