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.
>
> --
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,
>
> > > >
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
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
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
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
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
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.
>
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 <--
>
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
10 matches
Mail list logo