Created
August 24, 2021 13:20
-
-
Save iamramahibrah/ab149dd9f1873a79a23b733df5753ca9 to your computer and use it in GitHub Desktop.
Case Statement in shell script!!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
############################### | |
# Case statement shell script | |
# Author iamramahibrah | |
############################### | |
echo -e -n " | |
Choose one scripting language below | |
=============== | |
1. Python | |
2. Shell scripting | |
3. Perl :" | |
read input | |
case $input in | |
1) | |
echo -e "Start $input now." | |
;; | |
2) | |
echo -e "Start $input now." | |
;; | |
3) | |
echo -e "Start $input now." | |
;; | |
*) | |
echo "Invalid command" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment