Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Printing th entire line with a keyword

by RichardK (Curate)
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 examining the Monastery: (9)
As of 2014-04-17 02:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (437 votes), past polls