switch in bash
Posted: Sat Sep 19, 2020 2:21 pm
Hi,
is there an equivalent of switch in bash?
is there an equivalent of switch in bash?
Code: Select all
#Set the IP
case $VALUE in
1)
IP=192.168.1.160
NAME='a';
;;
2)
IP=192.168.1.161
NAME='B';
;;
*)
IP=192.168.1.1
NAME='Default';
;;
esac