Search and replace a word in more than one file more than once

Translation of the original in Catalan. Read it in: CatalàCastellano

Surely more than once you have had this need and you have been 'sweating' programming a shell script to do that well from Bulma they give us the solution: Search and change text inside a heap of files:

Apart from the article, I note down what comes next as a quick reference:


find ./ -type f -name '*.html' -exec perl -pi
-e 's/josep@nose.com/josep.cansat@de-spam.nose.com/;' {} \;

1 comment

Comments from the old blog, as they were written. Comments are closed.

  1. datarecovery