55 Words

A few small examples of the date command

Show the day of the week as a number (1 = Monday), which is always handy to know:

date +%u

Show the quarter of the year:

date +%q

In a script:

#!/bin/bash
todayWeekday=$(date +%u)
todayQuarter=$(date +%q)
echo "Today is weekday $todayWeekday, in quarter $todayQuarter of the year."