Hi,
I have a file a.xml containing the below
<customerId>000</customerId>
and a variable CUSTOMER_ID which is set to '333'
Now I want to replace <customerId>000</customerId> with <customerId>333</customerId> by the below sed command and save the output in a file b.xml:
sed 's/<customerId>\([0-9]*\)/<customerId> ${CUSTOMER_ID}/' a.xml > b.xml
But when I open b.xml after running the sed command, I see the below result :
<customerId> ${CUSTOMER_ID}</customerId>
Please help.