1. Write a Linux shell script that performs the following tasks:
a. Provide a mystery integer between 1 to 10.
b. Using “while” loop, allow the user to guess the random number until the user got it right.
c. If the user’s entered number is lower or greater than the random number, notify the user to guess higher or lower respectively.
d. If the user enters any number out of the 1 to 10 range, notify the user to enter in the correct number range.
e. Display a congratulatory message along with the random number if the user guessed it correctly.
Provide the shell script along with the sample output screenshot.
Comments
Leave a comment