passing bash variable to sed code example
Example: passing bash variable to sed
rr=abcd # in shell
sed -i "s/aaa/$rr/g" file.dat
# -i will update thefile,
rr=abcd # in shell
sed -i "s/aaa/$rr/g" file.dat
# -i will update thefile,