diff --git a/03-happy.sh b/03-happy.sh index 8095d30e..a36bf8ad 100644 --- a/03-happy.sh +++ b/03-happy.sh @@ -14,3 +14,13 @@ fi # exercise: write a script that prints whether today is # the weekend or not +#!/bin/bash + +day=$(date +%u) + +if [ $day -eq 6 ] || [ $day -eq 7 ] +then + echo "It's the weekend!" +else + echo "It's not the weekend yet." +fi diff --git a/04-life.sh b/04-life.sh index 537da386..9668c85b 100644 --- a/04-life.sh +++ b/04-life.sh @@ -14,3 +14,13 @@ fi # exercise: write a script that prints whether it is # morning or not +echo "Is it morning or night?" +read dayornight + +if [ "$dayornight" = "morning" ]; then +echo "It's about time for breakfast." +else +echo "It's about time for dinner." +fi + + diff --git a/Screen Shot 2023-04-02 at 6.39.44 PM.png b/Screen Shot 2023-04-02 at 6.39.44 PM.png new file mode 100644 index 00000000..221882bf Binary files /dev/null and b/Screen Shot 2023-04-02 at 6.39.44 PM.png differ