0





131
1

What tool or method do you recommend to find and replace values in your code? If code is on Linux/Unix, are find and grep the best method?

Question author Cory-house | Source

0


1

Take a look at ack, which is designed for searching big codebases.

For replacing, look at Perl's -i, -p and -e flags. You can do stuff like:

$ perl -i -p -e's/\bthisword\b/thatword/g' $(find . -name *.html)

to replace all instances of thisword with thatword in all .html files in the tree.

Answer author Andy-lester

Ask about this question here!