My man pages and info pages are not working well and I cannot figure out how
to make grep search for a certain pattern. I even tried egrep and fgrep. So
how do I reinvent grep with perl? Here is my attempt:

 

perl -n -e 'print "$. $_" if /^ *END *$/' *.f

 

This works better than grep, except for the fact it does not print the file
name. How can I make perl print the file file name?

 

How do I do this with (f\|e\|)grep? - woops - that is off topic. Never mind
then. Just, how do I print the file name using perl?

 

Thanks,

    Siegfried

Reply via email to