Hi all,
This is not a bash bug, but I am hoping the people on this list would
find the question interesting...
I have found it useful to have a "script-relative" version of
/usr/bin/env. Whereas env determines an interpreter's location based
on PATH, this version would determine the interpreter's
With bash is there any difference between the expressions ${1+"$@"} and "$@"?
Is there any difference with other sh-like shells?
Thanks,
ER
I've been trying to get a function called from PS1 to set a variable, e.g.:
num=1
function xyz {
((num++))
date; echo "num: $num"
}
PS1="\$(xyz): "
In this example, the global value of num doesn't change if it is
called from PS1. However num does get incremented if xyz is called
directly.
Is