Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 musing on the Monastery: (18)
As of 2015-05-27 16:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (540 votes), past polls