Linux case语句

来源:互联网 发布:js选择器innerhtml 编辑:程序博客网 时间:2024/05/21 22:53
     #! /bin/bash                                                                     read -p "input num:" num #从键盘读入      case $word in     1)#情况1     echo "hello"     ;;     2)#情况2    echo "hi"    ;;    *)#其他    echo "nothing"    ;;    esac
0 0