case (in) / esac
        The case construct is the shell scripting analog to switch in C/C++. It permits branching to one of a
        number of code blocks, depending on condition tests. It serves as a kind of shorthand for multiple
        if/then/else statements and is an appropriate tool for creating menus.
        case "$variable" in
         "$condition1" )
         command...
         ;;
         "$condition2" )
         command...
         ;;
        esac

:空操作
posted on 2009-09-14 16:47  物联互通  阅读(177)  评论(0编辑  收藏  举报