cat file | grep -e str1 -e str2
I'd think there are at least 10 different and reasonable versions of the above command possible in Perl, one would sth. read like:
perl -ne 'print if /str1/ || /str2/' file
Addendum: To use this under Windows, please replace the quotes, e.g.:
C:\> perl -ne "print if /str1/ || /str2/" file
Regards
mwa
In reply to Re: Perl in one line
by mwah
in thread Perl in one line
by Noame
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |