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
10 changes: 10 additions & 0 deletions 03-happy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions 04-life.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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


Binary file added Screen Shot 2023-04-02 at 6.39.44 PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.