created the text1.sh script with notepad
as in Microsoft's Notepad ?
then the FIRST thing you need to do is run
"dos2unix" on it to remove the MICROSOFT line endings
then you will likely need to look at it is gedit,kate,kwrite,vi,emacs,....
to make sure that it is not royally messed up from he Microsoft formatting