I am trying to do some tests to see if I can execute a shell script in a variables contents, similar to the Invoke-Expression function in powershell. I am getting the contents of the variable from curl:
a=$(curl https://some.site/test.sh)
however, whenever I print out the variable, it only gives the last line of the shell script.
Is there something I'm missing here? I'm using echo $a to print the variable.