#!/bin/ksh # # $Id: month,v 1.6 2009/10/11 03:17:46 vogelke Exp $ # # NAME: # month # # DESCRIPTION: # Runs "cal" to get the current month, and uses the # terminal standout codes to highlight today's date. # # AUTHOR: # Found this in a Unix mag # # NOTES: # Include /usr/compat/linux/usr/bin on FreeBSD unless you've # installed a recent version of ncurses. PATH=/usr/local/bin:/bin:/usr/bin export PATH DAY=$(date +%d | sed 's/0\([123456789]\)/ \1/') SMSO=$(tput smso) RMSO=$(tput rmso) cal | sed -e 's/^/ /' -e "3,\$s/ ${DAY}/ ${SMSO}${DAY}${RMSO}/" exit 0