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

# Check if today is the weekend
day=$(date +%u) # +%u gives 1 (Monday) through 7 (Sunday)

if [ "$day" -eq 6 ] || [ "$day" -eq 7 ]; then
echo "Today is the WEEKEND! 🎉"
else
echo "Today is a WEEKDAY. Keep going! 💪"
fi

Binary file added two_branches_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.