Project

General

Profile

Task #54020 » bugtracker-replace.sh

Steffen Gebert, 2013-11-27 21:03

 
#!/bin/bash

while read old new
do
echo "$old -> $new"
old=$(echo $old | sed "s/\?/\\?/g")
for file in $(grep -r -il "$old" *)
do
echo "Found $old in file $file"
sed -i '' -e "s#$old#$new#g" $file
done
done < ~/bugtracker-replace.txt

(1-1/2)