#!/bin/bash # echo -n "Ask me a question: " read question echo -n "Pick a color (Red, Green, Blue, or Yellow): " read color n1=`echo $color | wc -m` let n1=$n1-1 rem1=$(( $n1 % 2 )) if [ $rem1 == 0 ]; then echo -n "Pick a number (1-4): " read n2 rem2=$(( $n2 % 2)) if [ $rem2 == 0 ]; then echo -n "Pick another number (1-4): " read n3 if [ $n3 == 1 ]; then echo "Yes!" fi if [ $n3 == 2 ]; then echo "Nope, sorry." fi if [ $n3 == 3 ]; then echo "Groovy. (And no I don't care if that answered your question or not.)" fi if [ $n3 == 4 ]; then echo "Abso-freakin-lutely!" fi else echo -n "Pick another number (5-8): " read n4 if [ $n4 == 5 ]; then echo "The world may never know." fi if [ $n4 == 6 ]; then echo "...Definitely not." fi if [ $n4 == 7 ]; then echo "The future is uncertain at this time." fi if [ $n4 == 8 ]; then echo "Seems probable." fi fi else echo -n "Pick a number (5-8): " read n5 rem3=$(( $n5 % 2)) if [ $rem3 == 0 ]; then echo -n "Pick another number (5-8): " read n5 if [ $n5 == 5 ]; then echo "This world may never know." fi if [ $n5 == 6 ]; then echo "...Definitely not." fi if [ $n5 == 7 ]; then echo "The future is uncertain at this time." fi if [ $n5 == 8 ]; then echo "Seems probable." fi else echo -n "Pick another number (1-4): " read n6 if [ $n6 == 1 ]; then echo "Yes!" fi if [ $n6 == 2 ]; then echo "Nope, sorry." fi if [ $n6 == 3 ]; then echo "Groovy. (And no I don't care if that answered your question or not.)" fi if [ $n6 == 4 ]; then echo "Abso-freakin-lutely!" fi fi fi