Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Perl and or Grep Help!

by Anonyrnous Monk (Hermit)
on Jan 17, 2011 at 20:48 UTC ( [id://882750]=note: print w/replies, xml ) Need Help??


in reply to Perl and or Grep Help!

For one, you need to quote the *.pl, so the shell doesn't expand it.  I.e., either

$ find /start_dir -name "*.pl" -exec grep -i -H -n 'email' {} \; > res +/results.txt

or

$ find /start_dir -name "*.pl" -print0 | xargs -0 grep -i -H -n 'email +' > res/results.txt

(the -print0 / -0 combination is for when the filenames contain spaces — good habit to get into, even if they don't, for now)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (1)
As of 2024-04-25 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found