case expression in

pattern1)

statements;;

pattern2)

statements;;

pattern3 | pattern4)

statements;;

esac

 

 

case $1 in

-f)

-d)

esac

 

case $1 in

*.jpg) gpview $1;;

*.txt) gvim $1;;

*.avi | *.wmv mplayer $1;;

*.pdf) acroread $1;;

*) echo $1:Don’t know how to read this file;;

esac

Leave a Reply

Your email address will not be published. Required fields are marked *