echo: bad interpreter: No such file or directory , most likely from the first line, #!... which is called the Shebang line .
About the line #!...
This line tells the shell which interpreter to use to run the file. It could be, for example, bash or sh (which (approximately) is a subset, so many things will not work), or basically everything that the contents of a file can do - Perl, Python, Ruby, Groovy ...
The line tells the system in cases where you call the script directly when it is executed:
./myScript.sh
It is also often used by editors to recognize the correct syntax highlighting when a file does not have a suffix - for example, Gedit does this.
Decision
To override a string, pass the script to Bash as a parameter:
bash myScript.sh
Or, you can "find" it, which means, from within the Bash shell, do any of
source myScript.sh . myScript.sh
which will work (approximately), as if you inserted the commands yourself.
Ondra Žižka
source share