Created
August 28, 2012 04:48
-
-
Save ahpook/3495041 to your computer and use it in GitHub Desktop.
working on shell scripts with gunnar
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
| #!/bin/zsh | |
| say "hi gunnar" | |
| say "how are you today?" | |
| echo -n "your answer? " | |
| read feeling_answer | |
| say "i am glad that you are $feeling_answer" | |
| say "do you want food?" | |
| echo -n "your answer? " | |
| read food_answer | |
| if [[ $food_answer =~ "^(y|yes|of course)" ]] ; then | |
| say "well go get some food!" | |
| elif [[ $food_answer =~ "^(n|no|negative)" ]] ; then | |
| say "good, i don't have any food for you anyway!" | |
| else | |
| say "I don't understand. Sorry." | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment