Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Bash switch

case "$C" in
"1")
    do_this()
    ;;
"2" | "3")
    do_what_you_are_supposed_to_do()
    ;;
*)
    do_nothing()
    ;;
esac
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Bash #switch
ADD COMMENT
Topic
Name
2+8 =