don't just seek to the next line if the script has been edited
From:
jidanni
Subject:
don't just seek to the next line if the script has been edited
Date:
Fri, 07 Jun 2013 20:34:06 +0800
Let's say you are running a script that is doing
a loop while ... echo Enter name; read name; ..
During which the script gets edited on the disk by somebody.
Well shouldn't bash, when it goes back to the disk to read some next
part of the script, first do some sort of check to tell if the script has
changed on disk, instead of the current behavior which apparently is to
seek() to the former byte number and execute the next line which now
very well might be halfway lodged inside some comment or something.