How can I prevent to run *)
(with echo "Other"
) in follow code?
I want when $a
is equal 18 just echo "A". Now echo "A" and "Other"
case "$a" in
[17-20])
echo "A"
;;
*) echo "Other"
;;
esac
How can I prevent to run *)
(with echo "Other"
) in follow code?
I want when $a
is equal 18 just echo "A". Now echo "A" and "Other"
case "$a" in
[17-20])
echo "A"
;;
*) echo "Other"
;;
esac
You can use this:
Shorter version: