search for a string through multiple php documents
View Single Post
05-19-2010, 05:36 PM
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
if you have shell access you could always use
grep -rl "text to find"
that will look at files in the current and sub directories and give you the file name and the line of text containing the text string...
Think about this a bit more, if it's s string replacement you could use sed...
sed -i 's/foo/foo_bar/g' *.php
* -i = edit the file "in-place": sed will directly modify the file if it finds anything to replace
* s = substitute the following text
* foo = the text string to be substituted
* foo_bar = the replacement string
* g = global, match all occurrences in the line
you need to be sure that the string your are searching for is unique !
Sex, Drugs & Linux Rules
Last edited by maeltar : 05-19-2010 at
. Reason: typo's
View Public Profile
Send a private message to maeltar
Find More Posts by maeltar