Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
pattern search in all the files in a directoryby Bharath666 (Novice) |
on Feb 19, 2013 at 06:28 UTC ( [id://1019457]=perlquestion: print w/replies, xml ) | Need Help?? |
Bharath666 has asked for the wisdom of the Perl Monks concerning the following question: Hi, I have the pattern something like "keyword : Multinode". Now, I need to search this pattern in all the files in a directory. If we found the pattern in any of the file, a non empty-string should be returned. It may contain file-name or directory name In shell scripting the following will do the same KeyMnode=`grep -w "keyword : Multinode" ${dirname}/*`please tell me if you need any more information.Thanks
Back to
Seekers of Perl Wisdom
|
|