I have a text file (mytext.txt), the content of which is as following:
My name is <@MY_NAME@> and my age is <@MY_AGE@> .
Now i have another property file (myprops) which is as following:
MY_NAME=abcdefgh
MY_AGE=000000
I was wondering, how can i replace the tags of mytext.txt, with its corresponding values in the property file. I tried using sed:
. ./myprops
sed -e "s/<@\(.*\)@>/$(\1)/g" mytext.txt