bash: switch case flow control
This is a wiki page. Be bold and improve it!
If you have any questions about the content on this page, don't hesitate to open a new ticket and we'll do our best to assist you.
case $var in
Note the two consecutive semi-column ";;" which are a necessary part of the syntax!
*) case is the default choice if none other apply.
case "$1" in
'banana' | 'apple' )
echo 'It is a fruit.';;
echo 'It is an animal.';;