[SunHELP] RE:Scripting Question

Naser Ali sunhelp at sunhelp.org
Wed Feb 21 17:01:28 CST 2001


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C09C5A.395EFCD0
Content-Type: text/plain;
	charset="iso-8859-1"

Thanks for the help all, and I apollogize for asking the question
incorrectly,
I ll give it a try again,

this is how the input file looks like
#cat inputfile.txt
############ 20010216_200000 ########### 
220 
190 
180 
190 
210 
180 
190 
190 
190 
180 
The Average time for this ping is: 192 
######################################## 


############ 20010216_203000 ########### 
 The listner is down at this time 
######################################## 

++++++++++++++End of input file+++++++++++  (this line is not part of
inputfile.txt)

I do not want to process the lines with "The listner is down at this time" ,
one above it and one below it. Once this has been taken care of then I want
to pick up the time stamp, seperate it in a following way
"2000::02::16::20::00" and then capture the number from the line with
"Average" and associate it with the time in the following way
"2000::02::16::20::00::192"

In other words I want to read between lines which start with the time stamp
and the next line should have a number only and read untill I see the
average, if this is not the pattern then I do not want to read the pattern.

Hope this makes sense.

Thanks to every one in advance. Much appreciated.




------_=_NextPart_001_01C09C5A.395EFCD0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE:Scripting Question</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Courier New">Thanks for the help all, and I =
apollogize for asking the question incorrectly,</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">I ll give it a try =
again,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">this is how the input file looks =
like</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">#cat inputfile.txt</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">############ 20010216_200000 =
########### </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">220 </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">190 </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">180 </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">190 </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">210 </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">180 </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">190 </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">190 </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">190 </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">180 </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">The Average time for this ping =
is: 192 </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New">######################################## </FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Courier New">############ 20010216_203000 =
########### </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New"> The listner is down at =
this time </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New">######################################## </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">++++++++++++++End of input =
file+++++++++++  (this line is not part of inputfile.txt)</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">I do not want to process the =
lines with "The listner is down at this time" , one above it =
and one below it. Once this has been taken care of then I want to pick =
up the time stamp, seperate it in a following way =
"2000::02::16::20::00" and then capture the number from the =
line with "Average" and associate it with the time in the =
following way "2000::02::16::20::00::192"</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">In other words I want to read =
between lines which start with the time stamp and the next line should =
have a number only and read untill I see the average, if this is not =
the pattern then I do not want to read the pattern.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">Hope this makes sense.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">Thanks to every one in advance. =
Much appreciated.</FONT>
</P>
<BR>
<BR>

</BODY>
</HTML>
------_=_NextPart_001_01C09C5A.395EFCD0--



More information about the SunHELP mailing list