14

This is an error-proof version (I hope) of a similar command found around.

The issue with the other version is it can behave abnormally with last days of the month or interpret the day in the very first line.

This version consists of a single shell line:

ncal | sed -E '1,$'"s/ ($(date +%e))( |$)/ $(echo '\033[1;31m')\1$(echo  '\033[0m')\2/"

Geeklet files to download

Comments

User Avatar
piotrbox 2892 days ago
Hello. great calendar. Any Idea how to remowe Month and Year from the TOP???

thanx.
User Avatar
belz 2868 days ago
If you want week presented add "-w" like this:

ncal -w | sed -E '1,$'"s/ ($(date +%e))( |$)/ $(echo '\033[1;31m')\1$(echo '\033[0m')\2/"

Would have been nice if it said week in front but don't know how to.

Log in to comment or register here.