Scripting
>>
Perl
>>
How to scan a directory and search for files containing a specific string
following example scans the /apache/htdocs directory and searches each file for the pattern "
) { if ( (/$pattern/gi) ) { chomp; print "[$dirname\/$file] $_\n"; print "----------------------------------------\n"; } } close(inhandle); }
Please enable JavaScript to view the
comments powered by Disqus.