case基本语法

case基本使用

case "$1" in 
        "start"|"START")
        echo "$0 start"
        ;;

        "stop"|"STOP")
        echo "$0 stop"
        ;;

        "restart"|"reload")
        echo "$0 $1...."
        ;;

        *)
        echo 'please input "start|stop|restart|reload" '
        ;;
esac

名称栏目:case基本语法
链接分享:http://pwwzsj.com/article/pidcsg.html