use variable in string shell script code example
Example 1: sh declare variable
#!/bin/sh
MY_MESSAGE="Hello World"
echo $MY_MESSAGE
Example 2: bash use variable in string
domain='http://www.whitehouse.gov'
path='/some/path'
base_url="$domain$path"
Example 3: bash variable in string
${!var} #Just use to use reference value inside another variable ;)