RE: [PHP] Search for keyword in txt file
| From: | Ernest E Vogelsinger | Date: | Fri, 07 Mar 2003 10:38:13 +0000 |
| Subject: | RE: [PHP] Search for keyword in txt file | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138601@lists.php.net to get a copy of this message | ||
At 11:36 07.03.2003, Chris Blake said:
--------------------[snip]--------------------
>Ok, it
s not that easy......heres my code...I wanna search all
>the
>files in the "logs" directory and for each file found I want it to
>search for the word "started" and print that line into a table row.....
>
>I will probably need to do like a "for each" loop....but where do I
>insert it ?
--------------------[snip]--------------------
In case you're _not_ in safe mode:
$result = grep -n started logs/*;
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/