${[a-zA-Z0-9._:]*}
I have used the above pattern for grepping words similar to ${SomeText}. How can I replace 'SomeText' with some other string i.e ${SomeText} --> SomeString in my bash script?
Example: file.txt
text text text ${SomeText1} text text ${SomeText2} text text text text text text
text text text text ${SomeText3} text text text text text text ${SomeText4} text
...
my script file:
SomeText1="foo"
SomeText2="bar"
..
I want to replace ${SomeText1} to $SomeText1 which will be replaced by foo. Similarly ${SomeText2} > $SomeText2 > bar
text text text foo text text bar text text text text text text
text text text text baz text text text text text text qux text
...