massive find and replace
Hi,The following is a sh script that was made for me to perform a function serverwide. Basically it searched through all the .htaccess files on the server and commented out php_values, php_flags, php_admin functions.
for F in `grep -rHi --include=.htaccess "^php_" /home*/*/public_html/|cut -d ':' -f1 | uniq`; do
replace "\^php_value" "#php_value" -- $F; replace "\^php_admin" "#php_admin" -- $F; replace "\^php_flag" "#php_flag" -- $F;
done;
I would like to use the above to do a find and replace throughout alot of files in one certain directory.
Let's say for example I have files in:
/home/myfiles
All the files are .html or .php.
I want to replace "Company Name" with "company name"
Does anybody know how to write the following string in the way I would need it to perform my search and replace?