Published on March 22, 2017 by ProgrammingKnowledge

For more detailed Tutorial visit – goo.gl/jLzKh2

The case statement is used to execute statements based on specific values. Often used in place of an if statement, if there are a large number of conditions.The variable is compared with the values using the shell wildcards ( ? * […] ) .
[a-z] )
specifies a range which matches any lowercase letter from “a” to “z”
[A-Z] )
specifies a range which matches any lowercase letter from “A” to “Z”
[0-9] )
specifies a range which matches any value 0 to 9″ ;;
? )
Matches a string with exactly one character like a, !, and so on.
* )
Matches a string with one or more characters (a nonempty string).

My Website – www.codebind.com
My Blog – goo.gl/Nd2pFn
My Facebook Page – goo.gl/eLp2cQ
Google+ – goo.gl/lvC5FX
Twitter – twitter.com/ProgrammingKnow
Pinterest – goo.gl/kCInUp
Text Case Converter – goo.gl/pVpcwL
Epoch Timestamp Converter – goo.gl/Zedjo5
Decimal – Binary – Hexadecimal Converter – goo.gl/rkX3JE
8-bit Checksum Calculator – goo.gl/inxvIT

Leave a Reply

3 Comments on "Shell Scripting Tutorial for Beginners 13 – The case statement Example"

Notify of
avatar

Luis
Guest
Luis
3 months 29 days ago

dude can u help me with something

CHR!57!4N 4RM45
Guest
CHR!57!4N 4RM45
4 months 11 hours ago

Great Videos

ProgrammingKnowledge
Guest
ProgrammingKnowledge
4 months 12 hours ago

For more detailed Tutorial visit – goo.gl/jLzKh2

wpDiscuz