Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Printing th entire line with a keyword

by RichardK (Priest)
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 exploiting the Monastery: (11)
As of 2014-10-31 16:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (220 votes), past polls