2021-04-07 15:27:02 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Use grep and sed to replace $1 with $2 recursively and print what is done
|
2021-05-02 17:35:50 +00:00
|
|
|
grep --null --recursive --files-with-matches \
|
2021-06-19 19:25:10 +00:00
|
|
|
--binary-files=without-match "--exclude-dir={$IGNOREDIRS}" "$1" |
|
2021-05-05 06:56:44 +00:00
|
|
|
xargs -0 sed -i "\|${1}|{
|
|
|
|
s||${2}|g
|
2021-04-07 15:27:02 +00:00
|
|
|
w /dev/stdout
|
|
|
|
}"
|
|
|
|
|