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
8 changes: 5 additions & 3 deletions 03-happy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/sh

echo "You are happy?"

echo "Are you feeling happy today?"

read answer

if [ "$answer" = "yes" ]; then
Expand All @@ -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
echo "Today is a weekday. Keep focus on your work!"
fi
47 changes: 47 additions & 0 deletions 07-beer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added Paul_Hernandez/Repo_Insight.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 Paul_Hernandez/part_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions Paul_Hernandez/phernandez_read-input.sh
Original file line number Diff line number Diff line change
@@ -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.'