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. > > >>>> --------------------------------- > >>>> --> 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 > > >> I want my output to be entered temporary in /tmp/output for further > >> processing. > > >> --> Checking Server Hostname <-- > >> --------------------------------- > >> Server Hostname: xxxxxxxxx > > > In short I need to read the text between 2 lines, which can be > > incorporated in the perl script, but not a one-liner. > > I'm afraid it's very unclear what it is you need. Can you give a > real-world example of your input and required output please? > > Rob- Hide quoted text - > > - Show quoted text -
Hi, Sorry for that... Following is the real world example. Input File. --------------------------------- --> 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 DNS Name : xxxxxx [WARNING] Please check the DNS name. -------------------------------------- --> Validating APP Server Entries <-- -------------------------------------- Buffer size: [WARNING] Invalid Log count. Required buffer size is 20. Output File Validating DNS Server Entries -------------------------------------- DNS Name : xxxxxx [WARNING] Please check the DNS name. Validating APP Server Entries -------------------------------------- Buffer size: [WARNING] Invalid Log count. Required buffer size is 20. Here we are capturing only the WARNING messages along with the Heading. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/