shell script var in string code example
Example 1: sh declare variable
#!/bin/sh
MY_MESSAGE="Hello World"
echo $MY_MESSAGE
Example 2: bash variable in string
${!var} #Just use to use reference value inside another variable ;)
#!/bin/sh
MY_MESSAGE="Hello World"
echo $MY_MESSAGE
${!var} #Just use to use reference value inside another variable ;)