I have a file file.txt
with this content: Hi {YOU}, it's {ME}
I would like to dynamically create a new file file1.txt
like this
YOU=John
ME=Leonardo
cat ./file.txt | sed 'SED_COMMAND_HERE' > file1.txt
which content would be: Hi John, it's Leonardo
The sed command I tried so far is like this s#{\([A-Z]*\)}#'"$\1"'#g
but the "substitution" part doesn't work correctly, it prints out Hi $YOU, it's $ME