In this case, the problem is in how you deploy the scripts, and not
with bash. Don't change a running script, just write the new script
to a temp file and then replace the script.
That looks something like this:
mv newscript oldscript
This way, bash will keep reading from oldscript, but new in
"Aronesty, Erik" writes:
> I'd like to add a very simple command line flag to bash that forces it to
> make a temporary copy of the script that's running so that developers of
> scripts in these environments can continue to use tools like rsync or git,
Neither rsync nor git update files in-place
Bash's feature of being editable while it's running is particularly concerning
for environments where there are many developers or where tools like rsync
might be used on a source directory.
See below for an example/solution:
http://stackoverflow.com/a/19430939/627042
I'd like to add a very si