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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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:
to replace all instances of thisword with thatword in all .html files in the tree.