[root@gfs-node122 shell]# cat 1.sh
#!/bin/bash
read -p "please input a number:" jin
case "$jin" in
1)
echo "The num you input is 1"
;;
2)
echo "The num you input is 2"
;;
[3-9])
echo "The num you input is $jin"
;;
*)
echo "please input [0 9] int"
exit ;
esac
[root@gfs-node122 shell]# bash 1.sh
please input a number:jin
please input [0 9] int
[root@gfs-node122 shell]# bash 1.sh
please input a number:1
The num you input is 1
[root@gfs-node122 shell]# bash 1.sh
please input a number:3
The num you input is 3