linux variable in string code example
Example 1: combine strings bash
foo="Hello"
foo="${foo} World"
echo "${foo}"
> Hello World
Example 2: bash use variable in string
domain='http://www.whitehouse.gov'
path='/some/path'
base_url="$domain$path"
foo="Hello"
foo="${foo} World"
echo "${foo}"
> Hello World
domain='http://www.whitehouse.gov'
path='/some/path'
base_url="$domain$path"