I am trying to write the following bash script:
HOME_DIR=/opt/my_home
find ./CONFIG -type f -exec sed -i "s/_HOME_DIR_/$_HOME_DIR/g" {} \;
The line that I want to be changed in the files is this:
users = "_HOME_DIR_/config/data/_DOMAIN_/users.conf"
So the end result must be:
users = "/opt/my_home/config/data/_DOMAIN_/users.conf"
But I am not getting that... I guess it's because of escape chars...
Can anyone shed some light?
Thanks