Untitled
public text v1 · immutable#!/bin/sh
megarcstatus=`/usr/local/sbin/megarc -dispCfg -a0 | grep "Logical Drive :"`
echo ""
echo `hostname` RAID Status:
echo ""
echo $megarcstatus
arraystatus=`echo "$megarcstatus" | awk '{print $9}'`
echo $arraystatus
if [ $arraystatus = "OPTIMAL" ]; then
echo $arraystatus
fi
Ouput is:
RAID Status:
Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL
OPTIMAL
Output Should be:
RAID Status:
Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL
OPTIMAL
OPTIMAL