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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pattern search in all the files in a directory
by tobyink (Canon) on Feb 19, 2013 at 08:14 UTC | |
| |
|
Re: pattern search in all the files in a directory
by 2teez (Vicar) on Feb 19, 2013 at 06:41 UTC | |
by Bharath666 (Novice) on Feb 19, 2013 at 07:13 UTC | |
by 2teez (Vicar) on Feb 19, 2013 at 07:46 UTC | |
by Bharath666 (Novice) on Feb 19, 2013 at 09:58 UTC | |
by 2teez (Vicar) on Feb 19, 2013 at 14:33 UTC | |
|
Re: pattern search in all the files in a directory
by toolic (Bishop) on Feb 19, 2013 at 14:10 UTC |