-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdino-debugger.sh
More file actions
executable file
·37 lines (30 loc) · 947 Bytes
/
dino-debugger.sh
File metadata and controls
executable file
·37 lines (30 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /usr/bin/bash
declare -a answers
answers=("Hmmmmmm" "Are you sure?" "Aha" "Aha aha" "Of course" "Tell me more" "No. Really?"
"That sounds interesting" "That sounds REALLY interesting" "No, you are kidding"
"Yes, but how much wood would a woodchuck chuck if a woodchuck could chuck wood?"
"Aha aha aha"
"Yes, but did you know I have an oscilloscope?"
"You don't say" "Say whaaaaat?" )
RANDOM=`(date +%M%S)`
echo $RANDOM
cowsay -f stegosaurus "Explain the program to me." # Line - by - line."
echo ""
echo -n "> "
while [ 1 ]; do
read str
if [ "$str" = "Bye" -o "$str" = "Goodbye" -o "$str" = "bye" -o "$str" = "goodbye" ]; then
cowsay -f stegosaurus "Goodbye, Sir"
echo ""
exit 0
fi
if [ "$str" = "quit" -o "$str" = "exit" ]; then
cowsay -f stegosaurus "Goodbye would have been more polite, but ok"
echo ""
exit 0
fi
cowsay -f stegosaurus ${answers[($RANDOM % ${#answers[@]})]}
echo ""
echo ""
echo -n "> "
done