I have a function name that was misspelled, and I want to change it. The function is called in many places of the project.
How will I do this with Linux command on SUSE?
|
I have a function name that was misspelled, and I want to change it. The function is called in many places of the project. How will I do this with Linux command on SUSE? | ||||
|
feedback
|
|
You can use a combination of
| |||||||||||||
feedback
|
|
A variant done with perl:
An advantage to this is that perl will create the backup files (with (The | |||||
feedback
|
|
This is exactly the same thing as John T's solution:
I usually don't pipe out to EDIT: more expensive.... per comments below. | |||||||||||
feedback
|
|
Supplement to the other very good suggestions already posted: make a backup of the whole site (cp -r /var/www /var/wold) and do the editing there. Personally I would then move the modified files under, for instance /var/www/changed and test http://www.sitename.tld/changed to make sure all the scripts work before going live. | |||
|
feedback
|