I\'m in a bash crash course today.
This is a bash function that returns a value, via echo:
#!/bin/bash get_hello_name() { echo \'Hello $1!\' } msg=
You might want to call it with a double quote echo "$x" However if you would want to explicitly show what you typed inside, also known as literal expression use a single quote echo '$x'
echo "$x"
echo '$x'