diff --git a/03-happy.sh b/03-happy.sh index caa24718..a29c620a 100644 --- a/03-happy.sh +++ b/03-happy.sh @@ -1,6 +1,8 @@ #!/bin/sh -echo "You are happy?" + +echo "Are you feeling happy today?" + read answer if [ "$answer" = "yes" ]; then @@ -20,5 +22,5 @@ if [[ ${day,,} == "saturday" ]] | [[ ${day,,} == "sunday" ]] then echo "Horayyyy!! Today is the weekend. Enjoy yourself! Be ready for the next week." else - echo "Today is a weekday. Keep focus on your work." -fi \ No newline at end of file + echo "Today is a weekday. Keep focus on your work!" +fi diff --git a/07-beer.sh b/07-beer.sh index b0b033ce..0906bd12 100644 --- a/07-beer.sh +++ b/07-beer.sh @@ -23,6 +23,53 @@ done # exercise: implement another counting song (such as 12 days of Christmas) # using loops and if statements. +echo "How many days, should we sing about?" +read day + +current=$day + +while [ $current -ge 1 ]; do + echo "On the $current day of our celebration, we enjoyed: " +if [ $current -ge 12 ]; then + echo " - Twelve lanterns glowing" +fi +if [ $current -ge 11 ]; then + echo " - Eleven crystals shining" +fi +if [ $current -ge 10 ]; then + echo " - Ten banners waving" +fi +if [ $current -ge 9 ]; then + echo " - Nine bells ringing" +fi +if [ $current -ge 8 ]; then + echo " - Eight stars a‑twinkling" +fi +if [ $current -ge 7 ]; then + echo " - Seven candles burning" +fi +if [ $current -ge 6 ]; then + echo " - Six ribbons fluttering" +fi +if [ $current -ge 5 ]; then + echo " - Five golden stones" +fi +if [ $current -ge 4 ]; then + echo " - Four silver charms" +fi +if [ $current -ge 3 ]; then + echo " - Three bright feathers" +fi +if [ $current -ge 2 ]; then + echo " - Two wooden carvings" +fi + +echo " - One shining star" +echo "" + +((current = current - 1)) +done + echo "Now we sing about monkeys jumping on the bed" echo "How many monkeys?" read count diff --git a/Paul_Hernandez/Repo_Insight.png b/Paul_Hernandez/Repo_Insight.png new file mode 100644 index 00000000..57f616b4 Binary files /dev/null and b/Paul_Hernandez/Repo_Insight.png differ diff --git a/Paul_Hernandez/part_2.png b/Paul_Hernandez/part_2.png new file mode 100644 index 00000000..55be82e1 Binary files /dev/null and b/Paul_Hernandez/part_2.png differ diff --git a/Paul_Hernandez/phernandez_read-input.sh b/Paul_Hernandez/phernandez_read-input.sh new file mode 100644 index 00000000..3f61254c --- /dev/null +++ b/Paul_Hernandez/phernandez_read-input.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Hello Paul Hernandez!" +echo "How old are you?" +read age +echo 'Thanks Steven! I see you are ' $age ' years old' + +echo "What school do you currently attend?" +read school +echo 'Nice! ' $school ' sounds like a great place to learn.'