is that what you want? Or using the regex for the above postperl -ne 'print if !/^#/ and /foo/' /tmp/foo.txt
perl -ne 'print if /^[^#]*foo/' /tmp/foo.txt
In reply to Re: Grep'ping on Unix without perl-compatible gnu grep - can you do it better?
by kielstirling
in thread Grep'ping on Unix without perl-compatible gnu grep - can you do it better?
by Tommy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |