Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Veritas Disk Failure Monitoring

Status
Not open for further replies.

h2hummer

MIS
Dec 10, 2002
2
US
I'm doing a forloop on a file containing servers with Veritas on them. The 'else' statement is giving problems. All I want is the entire line that contains the following 'error' or 'failing'. Here's what I have so far -
#!/bin/ksh
touch vxdisk_check && chmod 777 vxdisk_check
echo "Veritas Disk Failure Report"
echo "As of:" `date`
echo ""
echo ""
for host in `cat /home/dtalley/scripts/vxdisklist`
do
echo $host
rsh $host /usr/sbin/vxdisk list |
nawk
'{
if($0~/error/) print $0}
else {print "All is good"}
fi
}'
done


Any help would be appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top