Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Extract lines and output...

by cjensen (Sexton)
on Oct 10, 2001 at 01:45 UTC ( [id://117881]=note: print w/replies, xml ) Need Help??


in reply to Extract lines and output...

I usually use the unix command-line for stuff like this:

head -4 *.txt | \
perl -pe '/==>\s(.*)\s<==/ ? ($f, $_) = ($1, undef) : $_ = "$f: $_";' \
>> output_filename

Replies are listed 'Best First'.
Re: Re: Extract lines and output...
by airblaine (Acolyte) on Oct 10, 2001 at 19:00 UTC
    Perfect! Thanks all! A big help and learned alot! Perl rules!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-20 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found