Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions 11-song.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@
while [ true ]; do

# you can show a prompt with the read command
read -p "Do rae mi fa so la ti do? (q to end) > " note
read -p "Enter a color to know the meaning! (q to end) > " color

case $note in
case $color in
# each case matches a pattern
do|Do)
echo "Doe a deer a female deer"
blue|Blue)
echo "Blue represents calmness"
;;
rae|Rae)
echo "Ray a drop of golden sun"
red|Red)
echo "Red represents danger"
;;
mi|Mi)
echo "Me a name a call myself"
yellow|Yellow)
echo "Yellow represents happiness"
;;
fa|Fa)
echo "Far a long long way to run"
purple|Purple)
echo "Purple represents royalty"
;;
so|So)
echo "So a note that follows fa"
green|Green)
echo "Green represents growth"
;;
la|La)
echo "La a note that follow so"
orange|Orange)
echo "Orange represents creativity"
;;
ti|ta)
echo "Tea I drink with jam and bread"
black|Black)
echo "Black represents power"
;;
q)
echo "Hope you enjoyed the sound of music"
echo "Hope you learned what all the colors mean!"
exit 0
;;
*)
echo "Not a note"
echo "I don't have that color's meaning!"
;;
esac

Expand Down
Binary file added after-merging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added two-branches.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.