Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^5: Join lines that match an string

by kennethk (Abbot)
on Jul 13, 2010 at 00:25 UTC ( [id://849135]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Join lines that match an string
in thread Join lines that match an string

I am confused. If I copy the posted file:

EV = 0x10eb250 (class, event_handle: 3503519, mc_ueid: 1278629168) 20100708 224608.259843 RULES: IMC110203I: #3503519: $EV.m c_host 20100708 224608.260757 RULES: IMC110801I: #3503519: Rule e execution starting with . . . msg='script to be execute remotely: exists("TRUSTEDALARM"); Local Id: Rem_010965WAP_18504'; . . . p_agrs

into the file 'input.txt' and then execute the command

perl -e 'while(<>){chomp; last if /p_agrs/;print if /remotely/}' < input.txt

I get the output

msg='script to be execute remotely:

Is this not consistent with what you observe?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://849135]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-24 18:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found