Re: Count number of files containing certain string
| From: | Jason Wong | Date: | Wed, 07 Aug 2002 05:34:51 +0000 |
| Subject: | Re: Count number of files containing certain string | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111473@lists.php.net to get a copy of this message | ||
On Wednesday 07 August 2002 04:43, Jason Wong wrote:
> 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.
Or you can try this:
http://www.phpclasses.org/browse.html/package/655.html
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
UNIX was half a billion (500000000) seconds old on
Tue Nov 5 00:53:20 1985 GMT (measuring since the time(2) epoch).
-- Andy Tannenbaum
*/