Skip to content

Instantly share code, notes, and snippets.

@thelinuxpoint
Created December 22, 2021 16:16
Show Gist options
  • Save thelinuxpoint/138c7c2159c8fbe29573763b0b841991 to your computer and use it in GitHub Desktop.
Save thelinuxpoint/138c7c2159c8fbe29573763b0b841991 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo -n "Enter the name of an animal: "
read ANIMAL
echo -n "The $ANIMAL has "
case $ANIMAL in
horse | dog | cat) echo -n "four";;
man | kangaroo ) echo -n "two";;
*) echo -n "an unknown number of";;
esac
echo " legs."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment