Replace content in multiple files with sed

Do this:

sed -i "s/old/new/g" *

You can also use a different delimiter, for instance when replacing paths:

sed -i "s;/old/path;/new/one;g"

The delimiter can also be a space like here:

sed -i "s old new g" *

Leave a Reply

Your email address will not be published. Required fields are marked *