Delete a line from multiple files
Posted: Mon Nov 09, 2009 9:29 am
Hi All,
I have a folder which contains 100 text files.
I want to have a PHP script which will read these files one by one and search for the string "i am the best".
If any files that contains the string "i am the best",the script should delete the entire line which contains the string "i am the best" from that file.
At the end of the script execution i should see all the files which does not have the string "i am the best" in it.
Can anyone plz help me
Thanks in advance.
I have a folder which contains 100 text files.
I want to have a PHP script which will read these files one by one and search for the string "i am the best".
If any files that contains the string "i am the best",the script should delete the entire line which contains the string "i am the best" from that file.
At the end of the script execution i should see all the files which does not have the string "i am the best" in it.
Can anyone plz help me
Thanks in advance.