I have global variable $MY_VAR
.
How can I execute second command only if the variable has value:
echo $MY_VAR && echo "Show me only if variable $MY_VAR has value"
I have global variable $MY_VAR
.
How can I execute second command only if the variable has value:
echo $MY_VAR && echo "Show me only if variable $MY_VAR has value"
echo $MYVAR ; [ -n "$MYVAR" ] && echo "show me only if..."
– cas Apr 11 '21 at 16:27