aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVG <vg@devys.org>2016-01-25 20:47:26 +0100
committerVG <vg@devys.org>2016-01-25 20:47:26 +0100
commitac5deefcfba8a5e29634af50cd43941d81b051c5 (patch)
tree01bb090cff9c1c393fdcfe10ae1904d371b03583
parentd114e9d54d63daa072cf0ea10e6a058592808a38 (diff)
downloadbulkrename-ac5deefcfba8a5e29634af50cd43941d81b051c5.tar.gz
bulkrename-ac5deefcfba8a5e29634af50cd43941d81b051c5.tar.bz2
bulkrename-ac5deefcfba8a5e29634af50cd43941d81b051c5.zip
change quoting to make renaming review more readable and robust
-rwxr-xr-xbulkrename2
1 files changed, 1 insertions, 1 deletions
diff --git a/bulkrename b/bulkrename
index e0a23d8..3df3b4b 100755
--- a/bulkrename
+++ b/bulkrename
@@ -25,7 +25,7 @@ if [ $(wc -l < "${namebase}.1") -ne $(wc -l < "${namebase}.2") ] ; then
exit 1
fi
-sed -i "s/'/'\"'\"'/g" "${namebase}.1" "${namebase}.2"
+sed -i -- 's/\([\\"$`]\)/\\\1/g;' "${namebase}.1" "${namebase}.2"
paste -d "\n" "${namebase}.1" "${namebase}.2" | while read -r input ; do
read -r output