1 | grep -rl "original" . |
1 | grep -rl matchstring somedir/ | xargs sed -i "s/string1/string2/g" |
The g parameter at the end of the regex will replace globally – all instances of string1.…
1 | grep -rl "original" . |
1 | grep -rl matchstring somedir/ | xargs sed -i "s/string1/string2/g" |
The g parameter at the end of the regex will replace globally – all instances of string1.…