goldenradium2001
Technical User
Is there any way to specify a null value for a case statement? For example here's my statement:
case "$var" in
1) echo "Correct. The answer is 1."
;;
<null>) echo "You need to enter a value."
;;
*) echo "Incorrect answer."
;;
esac
Thanks in advance!
case "$var" in
1) echo "Correct. The answer is 1."
;;
<null>) echo "You need to enter a value."
;;
*) echo "Incorrect answer."
;;
esac
Thanks in advance!