On Monday 17 December 2001 15:52, Jason Wong wrote:
> On Monday 17 December 2001 15:11, Sommai Fongnamthip wrote:
> > Hi,
> > How could search string (like full text search) in any text file (even
> > know or not known filename)?
>
> One way of doing this if you're using a Linux/Unix system is:
>
> $files = `grep -R "search_string" /path/of/directory/to/search/*`;
>
> $files would then contain the list of files in which "search_string" was
> found.
Sorry that should be:
$files = `grep -r "search_string" /path/of/directory/to/search/*`;
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
Love is the only game that is not called on account of darkness.
-- M. Hirschfield
*/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]