My goal is to add an argument to the executable if there is a bash variable like this:
bob -a some_arg (( if we have ${VAR} defined add '-b ${VAR}' as an argument ))
I would like to avoid something like:
if [[ -z ${VAR} ]]; then
bob -a some_arg
else
bob -a some_arg -b ${VAR}
fi
Although this is the only option?
Matoe source
share