I'm trying to replace a string over multiple files using the command sed like:
grep -rl matchstring somedir/ | xargs sed -i 's/string1/string2/g'
My question is: is there a way to enable it to ask for confirmation at each substitution?
I tried to include the latter c after g in the substitution command, but it didn't succeed.
Thank you in advance for any comments.