How about something along the lines of...
perl -i.bak -n -a -e 'print if $F[1] =~ /\d{5}/ and $F[1] > 713 and $F +[1] < 99930' *.dat
You don't want the -p switch because you don't always want to print. Use the -n switch instead for the same implicit while loop, but without the implicit print.
In reply to Re: In-place file filtering
by skyknight
in thread In-place file filtering
by princepawn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |