Unix Shell Script Line Ending & Executable Issue with Subversion

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
Code language: Bash (bash)
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. tortoise-svn-properties Similarly add property “svn:eol-style” with value native to subversion properties. svn-properties-unix-shell-script By adding above properties, the Shell Script line ending issue will be resolved.
Get our Articles via Email. Enter your email address.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *