I have this conditional in a script:
if [[ "${SUMAN_ENV}" != "local" ]]; then
./suman.sh $@ # run this script instead
# need to exit here
fi
if the condition is met, I'd like to run another script instead.
Is the best way to do this just to do this:
if [[ "${SUMAN_ENV}" != "local" ]]; then
./suman.sh $@
exit $? # exit with the code given by the above command
fi
or is there some other way?
"$@"with quotes to handle arguments with whitespace correctly