Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Printing th entire line with a keyword

by RichardK (Vicar)
on Dec 31, 2012 at 11:25 UTC ( #1011044=note: print w/ replies, xml ) Need Help??


in reply to Printing th entire line with a keyword

You could use the -n switch if you wanted a one line solution -

 perl -ne 'print if /key/' *.txt

see perlrun for the full details.


Comment on Re: Printing th entire line with a keyword
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2015-07-30 01:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls