I have been experiencing this problem intermittantly, I thought the problem was '/bin/sh -> /bin/dash' but I changed that to bash and the problem persists.
I am writing functions to be included in user's '.bash_profile' through source or '.' filename a quick example of the problem is illustrated by this snippet of pseudo code.
function wrapper()
{
function worker()
{
VAR="DEBUG TEXT "$(( $COUNT + 1))
echo $VAR
}
# test for a param first
# run param
$(eval $1)
}
I would then source this file and run 'wrapper worker'
the result is:
DEBUG: command not found
Does anyone know what causes this? I can post the actual script. I thought a generic example may do the trick.
Thank you,
Brian