tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Mark Bowman <mb301 () hotmail ! com>
To: tru64-unix-managers
Subject: SUMMARY: LMF TERMINATION DATE CHECKER
Date: Fri, 09 Mar 2001 11:31:09 +0000	[thread overview]
Message-ID: <98413750412930.tru64-unix-managers.marc@archive.invalid> (raw)

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.

                 reply	other threads:[~2001-03-09 11:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox