Let’s say I have a template text file most of whose content is static but has some variables. E.g.
My favorite site is ${FAV_SITE}
Let’s say that FAV_SITE is set to stackoverflow.com:
export FAV_SITE=stackoverflow.com
How do I print to STDOUT the contents of the file with the vars resolved, i.e.
My favorite site is stackoverflow.com
without using fancy tools like sed or awk?
Using Perl: