Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: peg - Perl _expression_ (GNU) grep script

by Clarendon4 (Acolyte)
on Nov 14, 2008 at 20:36 UTC ( #723724=note: print w/replies, xml ) Need Help??


in reply to Re: peg - Perl _expression_ (GNU) grep script
in thread peg - Perl _expression_ (GNU) grep script

To skip files beneath a directory, use -p with a suitable regex against the $File variable. eg
peg -p "$File !~ m#(^|/)(?:\.cvs|\.svn)/#" foobar
But you'll quickly tire of typing that, so add this to your PEG_OPTIONS in your "peg_ini.pl" file:
$ENV{'PEG_OPTIONS'} .= ' -p "$File !~ m#(^|/)(?:\.cvs|\.svn)/#" ';

Replies are listed 'Best First'.
Re^3: peg - Perl _expression_ (GNU) grep script
by Clarendon4 (Acolyte) on Jul 13, 2012 at 09:31 UTC
    This can now be done much more simply - just add:
    push @Exclude_dirs, ".svn", ".cvs";
    ... to one of the "peg_ini.pl" files.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://723724]
help
Chatterbox?
[Discipulus]: good morning community!

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2018-06-19 07:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (111 votes). Check out past polls.

    Notices?