Hi,
Everytime I run this script I get the following error.
PLEASE HELP
#!/bin/sh
## Variabales
PATH=${PATH}:/apps/verisity/sn_rel4.1/license/solaris
# The LIST variabale has to be set to the file that contains a list of hosts
LIST=list
ALIVE=0
DEAD=0
LOGFILE=/home/sysadmin/logs/log.`date +%y%m%d`
export LIST ALIVE DEAD LOGFILE PATH
if [ -f ${LOGFILE} ] ; then
mv ${LOGFILE} ${LOGFILE}.old
echo "\n UNIX SYSTEM REPORT for `date`" >> $LOGFILE
for i in `cat $LIST`
do
HOST=`ping $i | awk '{print $1}'`
if [ $i = $HOST ]
then
ALIVE=`expr ${ALIVE} + 1`
echo "\n This is the status report for $HOST" >> $LOGFILE
echo "\n ------------------------------------------------"
echo "\n\n" >> $LOGFILEQuote:>> $LOGFILE
echo "\n This yp server for $HOST is `/bin/rsh $HOST
"/bin/ypwhich"`" >> $LOGFILE
echo "\n" >> $LOGFILE
echo "\n These are the local filesystems that are mounted on
$HOST" >> $LOGFILE
echo "\n" >> $LOGFILE
/bin/rsh $HOST "/bin/df -lk" >> $LOGFILE
echo "\n" >> $LOGFILE
echo "\n These are the filesystems that are shared from
$HOST" >> $LOGFILE
echo "\n" >> $LOGFILE
/bin/rsh $HOST "/usr/sbin/dfshares" >> $LOGFILE
echo "\n" >> $LOGFILE
case $HOST in
"lotus")
echo "\n LICENSES" >> $LOGFILE
LICUP=`cat /tmp/lic | grep UP | wc -l`
cat /tmp/lic >> $LOGFILE
if [ $LICUP -eq 14 ]
then
echo "\n All the LICENSES on $HOST
are up" >> $LOGFILE
else
echo "\n Not all the LICENSES on
$HOST are ok" >> $LOGFILE
fi
\rm /tmp/lic;;
"jasmine")
echo "\n LICENSES" >> $LOGFILE
LICUP=`cat /tmp/lic | grep UP | wc -l`
cat /tmp/lic >> $LOGFILE
if [ $LICUP -eq 2 ]
then
echo "\n All the LICENSES on $HOST
are up" >> $LOGFILE
else
echo "\n Not all the LICENSES on
$HOST are ok" >> $LOGFILE
fi
\rm /tmp/lic;;
"geranium")
echo "\n LICENSES" >> $LOGFILE
LICUP=`cat /tmp/lic | grep UP | wc -l`
cat /tmp/lic >> $LOGFILE
if [ $LICUP -eq 4 ]
then
echo "\n All the LICENSES on $HOST
are up" >> $LOGFILE
else
echo "\n Not all the LICENSES on
$HOST are ok" >> $LOGFILE
fi
\rm /tmp/lic;;
esac
else
DEAD=`expr ${DEAD} + 1`
fi
done