Currently I find and replace using the following:
ack -l oldstring | xargs sed -i '' -e s/oldstring/newstring/g
Is there a way to do this without having to type out oldstring
more than once? This is what I'm trying that does not work:
ack -l oldstring | xargs sed -i '' -e s/{}/newstring/g