(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