Unix File Line Ending always gives you problem if you have your development environment in Windows and servers in Unix. Also if you are using Subversion as source control system then you need to be very careful about line endings.
I had this issue where a shell script was deployed on Unix machine. But I was not able to run the shell script. It gave error:
$> ./myShellScript.sh : bad interpreter: No such file or directory
Thus while working with shell script we must make sure that we set proper properties to the script. I solved the above issue by adding two subversion properties to the shell script.
svn:eol-style – native
svn:executable – *
If you are using Tortoise Client for Subversion, right click on the shell script file > Tortoise SVN > Properties.
Similarly add property “svn:eol-style” with value native to subversion properties.
By adding above properties, the Shell Script line ending issue will be resolved.