I know that this may sound as "not as intended by designer" but I have real life situation where a bash script I am modifying needs to call another bash script that I am not allowed to modify.
That "unmodifiable bash script" starts with:
source `dirname $0`/setenv.sh
setenv.sh also starts with
SCR2PATH=source "$( cd "$(dirname "$0")" ; pwd -P )" and is also unmodifiable)
Is there a trick in which I can fool the child script with a different
$0 than that of the calling script?