使用case语句

5年以前  |  阅读数:538 次  |  编程语言:Shell 
#!/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

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8