Published on March 21, 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 ( ? * […] ) , NOT regular expressions. All the statements are executed for the first matching value until the ending ;;. If no value matches, then the default *) case is executed, if present.
case statement:
Specify number of possible values for variable
Statement block executed for matching value
Only one block executed

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 12 – The case statement"

Notify of
avatar

Exodus
Guest
Exodus
2 months 7 days ago

+Programmingknowledge Hello I just wanted to ask you how a Linux Terminal or a CMD is programmed or made? And can you do a video on it please?

upgrade to NINTENDO
Guest
upgrade to NINTENDO
2 months 8 days ago

THE VIDEO TUTORIAL IS REALLY VERY USEFUL for BIGINERS

ProgrammingKnowledge
Guest
ProgrammingKnowledge
2 months 8 days ago

For more detailed Tutorial visit – goo.gl/jLzKh2

wpDiscuz