Basic Shell Scripting: Chapter-VI

Case Statement in Shell Script:

In shell script case statement is similar to switch statement in C. The case statement allows you to easily check pattern (conditions) and then process a command-line if that condition evaluates to true.

Syntax of bash case statement:

Example:

Previous Chapter

Next Chapter

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

Leave a Reply