Every Mac comes with cal
which shows a simple calendar of current month. Output is something like this:
February 2014
Su Mo Tu We Th Fr Sa
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
I was wondering if we can use some sed
and date
magic and highlight today's number using ANSI escape sequences. I haven't tried anything because I don't know much about sed
.
cal
from bsdmainutils 8.2.3 already seems to be highlighting the current date.