Skip to content

Instantly share code, notes, and snippets.

@hobs
Created September 26, 2010 16:16
Show Gist options
  • Save hobs/598068 to your computer and use it in GitHub Desktop.
Save hobs/598068 to your computer and use it in GitHub Desktop.
#!/bin/bash
# case $variable in
read -p "Enter an animals name: " animal
echo -n "A $animal has "
case $animal in
horse|cow|cat) echo -n "four ";;
man|woman) 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