This is MyScript.sh
I want to execute a script as a text inside my script, I have tried to do it like so:
bash -c "
#!/bin/bash
STR=6
echo $STR
"
Prints empty line.
I tried replacing bash -c with sh -c or eval, all options acts the same, why is that and how can it be solved?