>> On Mon, 10 May 2010 17:35:45 -0800, >> David Allen <the.real.david.al...@gmail.com> said:
D> 1. Why doesn't cal(1) hilight the current day? I'm not sure, but it's easy enough to script. See below the signature. If you don't have /bin/ksh, change the first line to #!/bin/sh. You definitely need either the Linux compatibility stuff or a decent version of ncurses installed for this to work. The basic version of tput (/usr/bin/tput) will not do the trick. D> 2. Why doesn't md5(1) have a "check" option? Seems to me requiring a D> manual inspection is error-prone at best, and makes scripting D> unecessarily complicated. Agreed. That's why I always install the GNU coreutils package, which includes the "md5sum" program. -- Karl Vogel I don't speak for the USAF or my company If men ruled the world #14: The 'Cops' program would be broadcast live so that you could phone in advice to the cops -- or crooks. --------------------------------------------------------------------------- #!/bin/ksh # # $Revision: 1.8 $ $Date: 2010-04-20 14:14:45-04 $ # $UUID: b604e100-38b2-33b6-8816-ab401a8fb12d $ # # 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 in PATH 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 _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"