in reply to BEGIN { } block
The Poor Man's Grep: for use on Windows when you have Perl but not grep(1).
perl -nle "BEGIN{@ARGV=map{glob}@ARGV}/PATTERN/&&print" <files> ...
Replace PATTERN with the pattern you want to find.
Here, the BEGIN{} is used to convert any wildcards in the <files> into real file names.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: BEGIN { } block
by dolmen (Beadle) on Aug 11, 2009 at 15:54 UTC | |
by Anonymous Monk on Aug 11, 2009 at 16:07 UTC |