I have a FILE variable in bash which I want replace RT in FILE's value to TTT.
Operations:
FILE="BlazeRT 123"
source_dir=BlazeRT
target_dir=BlazeTTT
newfile="$(echo ${FILE} | sed -e \"s/${source_dir}/${target_dir}/g\")"
I got error:
sed: -e expression #1, char 1: unknown command: `"'
Seems the error occurs when shell eval echo ${FILE} | sed -e \"s/${source_dir}/${target_dir}/g\".
Now, I wanna know ho to correct the last command.
Thanks in advance!