Skip to content
Open
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
6 changes: 6 additions & 0 deletions 04-life.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ if [ "$meaning" -eq 42 ]; then
else
echo "Awww... You don't know the meaning of life"
fi
if [ "$hour" -ge 5 ] && [ "$hour" -lt 12 ]; then
echo "Good morning!"
else
echo "It’s not evening right now."
fi

# here are some other arithemetic comparison operators
# -eq -ne -gt -ge -lt -le

# exercise: write a script that prints whether it is
# morning or not