Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Syntactic Confectionery Delight
 
PerlMonks  

Re: File::Find::Rule grep()

by 7stud (Deacon)
on Jan 26, 2013 at 06:19 UTC ( #1015469=note: print w/ replies, xml ) Need Help??


in reply to File::Find::Rule grep()

TIMTOWTDI. I'm using File::Find::Rule instead of File::Find for its globbing capabilities (although File::Find::Rule cannot handle multiple patterns in a glob string).


Comment on Re: File::Find::Rule grep()
Re^2: File::Find::Rule grep()
by Anonymous Monk on Jan 26, 2013 at 08:11 UTC

    TIMTOWTDI. I'm using File::Find::Rule instead of File::Find for its globbing capabilities (although File::Find::Rule cannot handle multiple patterns in a glob string).

    Huh? Sure it can, it uses Text::Glob#glob_to_regex

      $ md tmp $ cd tmp $ echo > asdf $ echo > asdg $ echo > asdh $ echo > bsdf $ echo > bsdg $ echo > bsdh $ echo > csdh $ echo > csda $ echo > csdd $ findrule . -file -name *h asdh bsdh csdh $ findrule . -file -name a* asdf asdg asdh $ findrule . -file -name b* bsdf bsdg bsdh $ findrule . -file -name *h asdh bsdh csdh $ findrule . -file -name {a*,b*,*h} asdf asdg asdh bsdf bsdg bsdh csdh $ cd .. $ findrule tmp -file -name {{a,b}*,*h} tmp/asdf tmp/asdg tmp/asdh tmp/bsdf tmp/bsdg tmp/bsdh tmp/csdh

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2014-04-18 02:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (460 votes), past polls