Re: Formating the log

2007-11-22 Thread avinashsuratkal
On Nov 22, 10:47 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: > avinashsuratkal wrote: > > > > > > > > I have the following log and my requirement is to capture the block > from one "-->" symbol to another. and put it in other file, using > perl. > > --

Re: Formating the log

2007-11-22 Thread avinashsuratkal
On Nov 22, 7:57 pm, [EMAIL PROTECTED] (Avinashsuratkal) wrote: > On Nov 22, 2:22 pm, [EMAIL PROTECTED] (Avinashsuratkal) > wrote: > > > > > > > On Nov 22, 2:27 am, [EMAIL PROTECTED] (Yitzle) wrote: > > > > On Nov 21, 2007 11:28 AM, avinashsuratkal <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > >

Re: Formating the log

2007-11-22 Thread Ron Bergin
On Nov 22, 6:57 am, [EMAIL PROTECTED] (Avinashsuratkal) wrote: > > In short I need to read the text between 2 lines, which can be > incorporated in the perl script, but not a one-liner. > > Thanks, If my interpretation of your needs is correct, then this will do the job. #!/usr/bin/perl use stri

Re: Formating the log

2007-11-22 Thread Ron Bergin
On Nov 22, 6:57 am, [EMAIL PROTECTED] (Avinashsuratkal) wrote: > On Nov 22, 2:22 pm, [EMAIL PROTECTED] (Avinashsuratkal) > wrote: > > > > > On Nov 22, 2:27 am, [EMAIL PROTECTED] (Yitzle) wrote: > > > > On Nov 21, 2007 11:28 AM, avinashsuratkal <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > I ha

Re: Formating the log

2007-11-22 Thread Rob Dixon
avinashsuratkal wrote: I have the following log and my requirement is to capture the block from one "-->" symbol to another. and put it in other file, using perl. - --> Checking Server Hostname <-- - Server Hostn

Re: Formating the log

2007-11-22 Thread Rob Coops
It could be just me but. perl -e 'while(<>){print "$1\n" if /-->(.*)<--/; }' inputFile > outputFile is pretty much the same as somethign like: #!/usr/bin/perl use strict; use warnings; my @array; open( IN, ") { my ($text) = $_ =~ m/-->(.*)<--/; push( @aaray, $text); } close(IN); fore

Re: Formating the log

2007-11-22 Thread avinashsuratkal
On Nov 22, 2:22 pm, [EMAIL PROTECTED] (Avinashsuratkal) wrote: > On Nov 22, 2:27 am, [EMAIL PROTECTED] (Yitzle) wrote: > > > > > > > On Nov 21, 2007 11:28 AM, avinashsuratkal <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I have the following log and my requirement is to capture the block > > > fro

Re: Formating the log

2007-11-22 Thread avinashsuratkal
On Nov 22, 2:27 am, [EMAIL PROTECTED] (Yitzle) wrote: > On Nov 21, 2007 11:28 AM, avinashsuratkal <[EMAIL PROTECTED]> wrote: > > > > > > > Hi, > > > I have the following log and my requirement is to capture the block > > from one "-->" symbol to another. and put it in other file, using > > perl. >

Re: Formating the log

2007-11-21 Thread yitzle
On Nov 21, 2007 11:28 AM, avinashsuratkal <[EMAIL PROTECTED]> wrote: > Hi, > > I have the following log and my requirement is to capture the block > from one "-->" symbol to another. and put it in other file, using > perl. > > - > --> Checking Server Hostname <-- >

Formating the log

2007-11-21 Thread avinashsuratkal
Hi, I have the following log and my requirement is to capture the block from one "-->" symbol to another. and put it in other file, using perl. - --> Checking Server Hostname <-- - Server Hostname: x