Date: Tue, 11 May 2010 13:56:21 -0400 (EDT) From: vogelke@bsd118.wpafb.af.mil (Karl Vogel) To: David Allen <the.real.david.allen@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: md5(1) and cal(1) Message-ID: <20100511175621.4B861BE5F@bsd118.wpafb.af.mil> In-Reply-To: <AANLkTil779I9T4JhvaHgCCYkbSTz4xoqzjGv6wYVpYaR@mail.gmail.com> (message from David Allen on Mon, 10 May 2010 17:35:45 -0800) References: <AANLkTil779I9T4JhvaHgCCYkbSTz4xoqzjGv6wYVpYaR@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>> On Mon, 10 May 2010 17:35:45 -0800, >> David Allen <the.real.david.allen@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100511175621.4B861BE5F>