How to get variable value from a file
This is my first time posting question here. Hope I post in the correct forum.
I have a question about variable.
I have a file (test.txt) with content like:
my name is $name
Here is my BASH script
name=Brennan filecontent=$(cat test.txt) echo $filecontent
I would like to display my result as my name is Brennan. However, my script returns my name is $name
Could you please guide how could I get the expected result?