Re: Count number of files containing certain string
| From: | Jason Wong | Date: | Tue, 06 Aug 2002 20:43:33 +0000 |
| Subject: | Re: Count number of files containing certain string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111431@lists.php.net to get a copy of this message | ||
On Wednesday 07 August 2002 03:02, René Fournier wrote:
> I'm trying to piece together readdir() with some other code that will
> let me count the number of files in a directory that match a defined
> string. For example, how many files in "/dir" contain the string
> "slides"?
>
> I need the resulting number to use in a Javascript slideshow...
>
> Any ideas?
If you're using a un*x system and you're not worried about code portability
then use grep.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
"It's like deja vu all over again." -- Yogi Berra
*/