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. > > > --------------------------------- > > --> Checking Server Hostname <-- > > --------------------------------- > > Server Hostname: xxxxxxxxx > > --------------------------------------- > > --> Checking Authentication Domain <-- > > --------------------------------------- > > Server is authenticating against: xxxxxxxxx > > > -------------------------------------- > > --> Validating DNS Server Entries <-- > > -------------------------------------- > > Servers should conform to global ANYCast Standard > > > Thanks > > Avinash > > You mean you want to turn the above input into somthing like this? > ------------------------------------- > Checking Server Hostname > Checking Authentication Domain > Validating DNS Server Entries > ------------------------------------- > > $ perl -e 'while(<>){print "$1\n" if /-->(.*)<--/; }' inputFile > outputFile- > Hide quoted text - > > - Show quoted text -
Hi Yitzle, Thank you for the reply... I want my output to be entered temporary in /tmp/output for further processing. --> Checking Server Hostname <-- --------------------------------- Server Hostname: xxxxxxxxx Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/