Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

case command in Linux with examples

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

case command in Linux is the best alternative when we had to use multiple if/elif on a single variable. It is used to execute the commands based on the pattern matching.

Syntax:

case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac

Example:

Options:

  • help case : It displays help information.
My Personal Notes arrow_drop_up
Last Updated : 15 May, 2019
Like Article
Save Article
Similar Reads
Related Tutorials