- Replace script works if I type manually but not in script
- ack-grep -a -l -i --print0 --text "$1" | xargs -0 -n 1 sed -i -e 's/$1/$2/g'
- ack-grep -a -l -i --print0 --text "something" | xargs -0 -n 1 sed -i -e 's/something/somethingelse/g'
- ack-grep -a -l -i --print0 --text "$1" | xargs -0 -n 1 sed -i -e "s/$1/$2/g"
- $ a=something
- $ b=somethingelse
- $ sed 's/$a/$b/g' testfile
- $ sed "s/$a/$b/g" testfile