Originally Posted by helptonewbie
1- i don't know if that would work 2- it probably not guaranteed to only be changing the table names and chances are it might go and change some of the data as well.
It would work, but these are valid concerns. I'd suggest first using grep
to check the pattern(s) matching the table name(s) to be changed. If you find some false positives you can tweak the pattern, and then create your sed
statement once the pattern is right.
An alternative (or complementary) approach would be to make the substitution using sed, but redirect the output into a new file rather than changing the original (i.e. don't use the -i
flag). Then use diff
on the original and modified files, to check the changes that have been made.