Skip to content

Instantly share code, notes, and snippets.

@iamramahibrah
Created August 24, 2021 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamramahibrah/ab149dd9f1873a79a23b733df5753ca9 to your computer and use it in GitHub Desktop.
Save iamramahibrah/ab149dd9f1873a79a23b733df5753ca9 to your computer and use it in GitHub Desktop.
Case Statement in shell script!!!
#!/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