Anyone who knows me knows I'm never finished tweaking scripts
and it was a slow day at the home office.
I wanted to merge single month and full year to eliminate duplication.
Also merge all date execs into one for efficiency, this made quoting more
complex to ensure all execs and substitutions occur in correct order.
cal -y | eval sed -r "\"$(date +'/%Y/,$ s/^/~/;/ %Y/,$ s/~(.{0,$((2%m%%3*22))})/\1~/;
/%B/,/[^ ]{4}/s/(~.{0,18})(%e)\>/\1`tput so`\2`tput se`/;s/~//')\""
Still not winning any beauty contests, now maybe an honorable mention in rube goldberg.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.