Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
RESPONSES=("It is certain" "It is decidedly so" "Without a doubt"
|
||||
declare -ra RESPONSES=("It is certain" "It is decidedly so" "Without a doubt"
|
||||
"Yes definitely" "You may rely on it" "As I see it yes"
|
||||
"Most likely" "Outlook good" "Signs point to yes" "Yes"
|
||||
"Reply hazy try again" "Ask again later"
|
||||
|
|
@ -12,13 +12,8 @@ RESPONSES=("It is certain" "It is decidedly so" "Without a doubt"
|
|||
printf "Welcome to 8 ball! Enter your questions using the prompt below to
|
||||
find the answers you seek. Type 'quit' to exit.\n\n"
|
||||
|
||||
while true; do
|
||||
read -p 'Enter Question: ' question
|
||||
if [ "$question" == "quit" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
response_index=$(($RANDOM % 20))
|
||||
|
||||
printf "Response: ${RESPONSES[response_index]}\n\n"
|
||||
until
|
||||
read -p 'Enter Question: '
|
||||
[[ "$REPLY" == quit ]]
|
||||
do printf "Response: %s\n\n" "${RESPONSES[RANDOM % ${#RESPONSES[@]}]}"
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue