On Tue, Aug 04, 2009 at 08:23:16AM -0700, John Reiser wrote: > On 08/04/2009 12:48 AM, fam...@icdsoft.com wrote: > > The problem is that Bash does not read up the whole script which it > > is currently executing. > > As a result of this, if we update the script file with a newer > > version while it is running, this may lead to unpredicted results.
> To avoid this feature, then use the "-c" parameter to specify the entire > shell input > as a string on the command line: > bash -c "$(< filename)" > Or, make a temporary unique copy of the file, then invoke the shell on the > copy. Or upgrade your scripts like this: mv -f /path/to/script /path/to/script.old cp newscript /path/to/script (Or remove-then-copy, or make /path/to/script a symlink to a version-stamped copy, or any number of other ways that are not "vi /path/to/script".)