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!

grep and set the result for e-mail 1

Status
Not open for further replies.

gatetec

MIS
Mar 22, 2007
420
US
The command below returns:

/usr/es/sbin/cluster/utilities/cldump |grep STABLE

either

Cluster Substate: STABLE

or

Cluster Substate: UNSTABLE

What I want is to get the word (STABLE or UNSTABLE) as $CLSTATE so that the result can show on the e-mail subject line.

mail -s "$SYSNAME State = $CLSTATE" .......

thx much
 
CLSTATE=`/usr/es/sbin/cluster/utilities/cldump |grep STABLE` |awk '{print $3}'`


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top