sed -i 's/\/bar/' $(git grep -l foo) # foo: phrase to find # bar: phrase to replace foo