SUMMARY: LMF TERMINATION DATE CHECKER

From: Mark Bowman <mb301_at_hotmail.com>
Date: Fri, 09 Mar 2001 11:31:09 +0000

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.
Received on Fri Mar 09 2001 - 11:32:20 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT