God I'm new to mac (I just got one) and I'm having trouble programming this .command file. It's a weird file (considering it tells jokes that make no sense) but when I open it, it just closes right away.
Heres the code;
Heres the code;
Code:
#!/bin/bash
PS3='Please enter your choice: '
options=("Polar bears in a tub" "Guys on a porch" "Squirrels in a tree" "People in a garden" "People in a restaurant" "Like us on Facebook" "Watch Star Wars" "Rate" "Donate" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Polar bears in a tub")
say "So... There were two polar bears sitting in a tub. One said, Pass the soap, The other one said, No soap, RADIO! HAH HAH! YOUR A NUB!"
;;
"Guys on a porch")
say "So... There were two guys sitting on a porch. One said, Pass the beer, The other one said, No beer, WHISKY! HAH HAH! YOUR A NUB!"
;;
"Squirrels in a tree")
say "So... There were two squirrels sitting in a tree. One said, Pass the leaves, The other one said, No leaves, BRANCHES! HAH HAH! YOUR A NUB!"
;;
"People in a garden")
say "So... There were two people sitting in a garden. One said, Tell me a joke, The other one said, No jokes, FUNNIES! HAH HAH! YOUR A NUB!"
;;
"People in a restaurant")
say "So... There were two people sitting in a restaurant. One said, Pass the tacos, The other one said, No tacos, PIZZA! HAH HAH! YOUR A NUB!"
;;
"Like us on Facebook")
echo "I tricked you, we don't have a Facebook!"
;;
"Watch Star Wars")
echo "This is the whole star wars movie, once you start it you can not stop it. Are you sure you want to do this?
PS3='Please enter your choice: '
options=("Yes" "No")
select opt in "${options[@]}"
do
case $opt in
"Yes")
telnet towel.blinkenlights.nl
;;
"No")
;;
;;
"Rate")
echo "Rate the jokes:"
echo "Polar bears in a tub"
PS3='Please enter your choice: '
options=("1" "2" "3" "4" "5")
select opt in "${options[@]}"
do
case $opt in
"1")
echo "Horrible"
;;
"2")
echo "Not so good"
;;
"3")
echo "Ok"
;;
"4")
echo "Good
;;
"5")
echo "Great"
;;
echo "Guys on a porch"
PS3='Please enter your choice: '
options=("1" "2" "3" "4" "5")
select opt in "${options[@]}"
do
case $opt in
"1")
echo "Horrible"
;;
"2")
echo "Not so good"
;;
"3")
echo "Ok"
;;
"4")
echo "Good
;;
"5")
echo "Great"
;;
echo "Squirrels in a tree"
PS3='Please enter your choice: '
options=("1" "2" "3" "4" "5")
select opt in "${options[@]}"
do
case $opt in
"1")
echo "Horrible"
;;
"2")
echo "Not so good"
;;
"3")
echo "Ok"
;;
"4")
echo "Good
;;
"5")
echo "Great"
;;
echo "People in a garden"
PS3='Please enter your choice: '
options=("1" "2" "3" "4" "5")
select opt in "${options[@]}"
do
case $opt in
"1")
echo "Horrible"
;;
"2")
echo "Not so good"
;;
"3")
echo "Ok"
;;
"4")
echo "Good
;;
"5")
echo "Great"
;;
echo "People in a restaurant"
PS3='Please enter your choice: '
options=("1" "2" "3" "4" "5")
select opt in "${options[@]}"
do
case $opt in
"1")
echo "Horrible"
;;
"2")
echo "Not so good"
;;
"3")
echo "Ok"
;;
"4")
echo "Good
;;
"5")
echo "Great"
;;
;;
"Donate")
open -a Safari https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=4dHtIuFUeTRnqOqzLu5wJ897QJSEwsbk3oaO1-gf2FHZTVDJhRJlVHr5iee&dispatch=5885d80a13c0db1f8e263663d3faee8d0b7e678a25d883d0fa72c947f193f8fd
;;
"Quit")
killall Terminal
;;
*) echo Invalid option;;
esac
done