Answers for "bash if set variable"

0

bash if set variable

if [ -z ${var+x} ]; then echo "var is unset"; else echo "var is set to '$var'"; fi
Posted by: Guest on December-02-2020
0

bash if set variable

if [ -z "$var" ]; then echo "var is blank"; else echo "var is set to '$var'"; fi
Posted by: Guest on December-02-2020

Code answers related to "bash if set variable"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language