echo string to variable bash code example
Example 1: bash echo to stderr
>&2 echo "error"
Example 2: bash variable in string
${!var} #Just use to use reference value inside another variable ;)
>&2 echo "error"
${!var} #Just use to use reference value inside another variable ;)