lh-l4v/misc/search-replace
Mitchell Buckley ca9b20e65b misc: Add search-replace.sh and README.md
search-replace.sh is a very simple script which takes a list of text
replacements and applies those replacements in all files in the current
directory. The README file contains more detailed information.

Signed-off-by: Mitchell Buckley <mitchell.alan.buckley@gmail.com>
2021-06-21 10:30:04 +10:00
..
README.md misc: Add search-replace.sh and README.md 2021-06-21 10:30:04 +10:00
search-replace.sh misc: Add search-replace.sh and README.md 2021-06-21 10:30:04 +10:00

README.md

search-replace.sh

This script takes an input file which is a list of text replacements and applies those replacements to all files in the current directory.

Usage: bash search-replace.sh renames.txt

where each line of renames.txt is of the form renames mysearchtext to myreplacetext.

Caution: if renames.txt is in the current directory then this script will act on that file and make it useless for future invocations.