(c) Write a shell program to illustrate the case statement.
A `case` statement in a shell script is used to execute one of the several possible branches based on the value of a variable. Below is an example of a shell script using the `case` statement in Linux to illustrate how it works. This script prompts the user to input a number and then prints a corresponding message based on that input.
```bash
#!/bin/bash
# Prompt user ________ _________ ______ ______ ___ ___ ______ _____.
______ __________ _____ ____ _________ ____ _________ ___ ___ _______ ____.
___ ______ _______ ____ _______ ____.
_______ ________ ______ ___ ________.
_____ __________ ________ _____ _______ ______ _________ ________ ________ _______ _______ ______.
_________ _____ ______ ____ _______ ____ ____ _____ _________ _____ ____.
________ _________ ______ ___ _________.
___ __________ ______ __________ _______ __________ ______ _____.
__________ ________ ___ __________ _____ _________ __________ _____ __________.
_________ _________ ___ _________ __________ ___ _______.
__________ __________ _____ __________ ___ _______ ___ ___ ____ _____.
_________ _____ _________ ________ ____ ________ ________ ______ ____ ______ _________.
________ _____ ____ ________ _________.
_________ ________ __________ ______ ___.
________ _________ ___ ________ ___ ______.
___ _______ ____ _________ ________ _____ _____ __________ _______.
___ ______ __________ _________ __________.
________ _____ ____ ________ _________ ____ __________.
_______ ___ ____ __________ __________ _______ ________ _____.
_______ ________ ____ ______ __________ _________ __________ ____ _________ ________ ____ ____.
_____ __________ __________ __________ ______.
___ __________ ________ _____ __________ __________ _________.
_______ ________ ____ ____ ___ ___ ________ ______ __________ ________.
____ ________ ___ ____ ____ _______ _____ _________ ________ __________ _________ __________.
___ ___ __________ __________ _____ _____.
_______ ________ _____ ___ ________ _________.
Get Full Answer on WhatsApp