How to "search and replace" many files?
You are looking for the sed
command. For example, to replace the "dog" with "cat" in all text files in the current directory:
sed -i 's/dog/cat/' *.txt
You are looking for the sed
command. For example, to replace the "dog" with "cat" in all text files in the current directory:
sed -i 's/dog/cat/' *.txt