Tente isto:
echo "Today's date is: $(date)"
day=$(date +"%u")
if ((day > 5)); then
echo "WEEKEND"
else
echo "WORKING DAY"
fi
Eu uso aritmética (( ))
bash
Ou menos legível:
echo "Today's date is: $(date)"
day=$(date +"%u")
if [[ day -gt 5 ]]; then
echo "WEEKEND"
else
echo "WORKING DAY"
fi