cd to that directory and then at the shell prompt give this command:
Copy and paste the contents in your post. Highlight the file you want to run/execute.
Here's an example:
<Press I to go in Insert Mode>
echo "myScript.sh - by Dev"
echo "Displaying Directory Contents..."
<Press Esc and Shift + : to go in Command Mode and Type>
:wq <Press Enter to Save and Quit>
#chmod u+x myScript.sh
What is stated between < and > is not be typed in the program itself. I guess you already know it.
You might not have given "execute permission" to your script file which also causes the error message to be displayed: Command not found