* SUMMARY: LMF TERMINATION DATE CHECKER
@ 2001-03-09 11:31 Mark Bowman
0 siblings, 0 replies; only message in thread
From: Mark Bowman @ 2001-03-09 11:31 UTC (permalink / raw)
To: tru64-unix-managers
Many thanks to all that replied to my request for help, and Specially to
Barry Branch who very kindly provided me with a easy to understand script
that was short and simply: -but does the job!
#!/bin/sh
MAILTO=${*:-"root"}
mm=`date +%b | tr '[a-z]' '[A-Z]'`
yy=`date +%Y`
expire=`/usr/sbin/lmf list full | grep -p ${mm}-${yy}`
if [ "${expire}" ]; then
mailx -s "The following licenses will expire this month for `hostname`"
$MAILTO <<EOF
$expire
EOF
fi
Rather than trying to exract the Termination date field, just use grep -p
which is a paragraph separator and look for the current month.
Regards
Mark
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-03-09 11:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-09 11:31 SUMMARY: LMF TERMINATION DATE CHECKER Mark Bowman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox