You could use the -n switch if you wanted a one line solution -
perl -ne 'print if /key/' *.txtsee perlrun for the full details.
In reply to Re: Printing th entire line with a keyword
by RichardK
in thread Printing th entire line with a keyword
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |