>Fixed - see below... > >> - this is caused by calling: >> >> cmd=$(basename "$0") >> >> - and I noticed that it didn't happen when I use: >> >> cmd=${0##*/} > >Mhhh, this works because there is no PATH lookup required to find the >matching command...
That's not the entire story. basename "$0" - no stat'ing .paths cmd=$(basename "$0") - stating .paths >The idea was to rename the PATH variable (e.g. via $ typeset -m ... #) >to something like "saved_path" and later do a $ PATH="${saved_path}" >"${cmd}" "$@" # which would have a similar effect... >... but your solution is shorter (and works since "sleep" is not bound >to a specific PATH element). And the other commands alias'ed to "alias"? Casper