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.
In reply to Re: BEGIN { } block
by shawnhcorey
in thread BEGIN { } block
by bob_dobalina
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |