nv-l
[Top] [All Lists]

RE: [nv-l] searching character string in a variable

To: "'Owens, Blaine C - Eastman'" <bowens@eastman.com>
Subject: RE: [nv-l] searching character string in a variable
From: "D'Apice, Dominic" <D.D'Apice@SAQ.qc.ca>
Date: Wed, 24 Apr 2002 10:44:02 -0400
Cc: "'nv-l@lists.tivoli.com'" <nv-l@lists.tivoli.com>
thank a lot , i really apreciate everybody
Dominic
-----Message d'origine-----
De : Owens, Blaine C - Eastman [mailto:bowens@eastman.com]
Envoyé : 24 avril, 2002 10:24
À : 'D'Apice, Dominic'
Objet : RE: [nv-l] searching character string in a variable


If I understand what you are wanting, something like:
 
if { `echo $alert | grep -c "rule 11` = "1" }
   then
        do something
fi

-----Original Message-----
From: D'Apice, Dominic [mailto:D.D'Apice@SAQ.qc.ca]
Sent: Wednesday, April 24, 2002 9:42 AM
To: 'nv-l@lists.tivoli.com'
Subject: [nv-l] searching character string in a variable


Hello all, nv7.1 aix433

i need to do a ksh script who seach a string character in a variable

what is the sentence for that ? i mean like  :

 grep "rule 11" $alert...

i would like to do something like that :

if  ( grep "rule 11" $alert ) = 1 then  # if we found this string then do
instructions
  # instructions
end if

but the variable does'nt work like a file :  grep "rule 11" script.sh

it will be apreciated 
> Dominic D'Apice
> Technicien informatique (OGEINF)
> Société des Alcools du Québec
> 2021 des futailles, Montréal Québec H1N 3M7
> * (514) 253-6015
> * D.D'Apice@saq.qc.ca
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe@lists.tivoli.com
For additional commands, e-mail: nv-l-help@lists.tivoli.com

*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)

<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web