forked from GGC-SD/bash_basics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path11-song.sh
44 lines (38 loc) · 792 Bytes
/
11-song.sh
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
38
39
40
41
42
43
44
#!/bin/sh
while [ true ]; do
# you can show a prompt with the read command
read -p "od ear im af os al it od? (q to end) > " note
case $note in
# each case matches a pattern
od|Od)
echo "you are an odd one"
;;
ear|Ear)
echo "do you listen to thy ear"
;;
im|Im)
echo "I'm a rock-star!"
;;
af|Af)
echo "You are down to earth af"
;;
os|Os)
echo "I win an Oscar you win an oscar!"
;;
al|Al)
echo "Full metal Alchemist!"
;;
it|It)
echo "You have the it factor"
;;
q)
echo "Hope you enjoy the insights"
exit 0
;;
*)
echo "Not a note"
;;
esac
done
# exercise: Change the input question and case
# statement to another theme.