shell/结构化命令/使用case语句.sh

16 lines
278 B
Bash
Raw Normal View History

2016-05-13 21:42:54 +08:00
#!/bin/bash
#using the case command
case $USER in
tiandi | barbar)
echo "Welcome, $USER"
echo "Pleas enjoy your visit";;
testing)
echo "Special testing account";;
jessica)
echo "Do not forget to logout when you are out";;
*)
echo "Sorry, you are not allowed here";;
esac