env: bash\r: No such file or directory [duplicate]

The error message suggests that the script you’re invoking has embedded \r characters, which in turn suggests that it has Windows-style \r\n line endings instead of the \n-only line endings bash expects. As a quick fix, you can remove the \r chars. as follows: sed $’s/\r$//’ ./install.sh > ./install.Unix.sh Note: The $’…’ string is an … Read more

How line ending conversions work with git core.autocrlf between different operating systems

The best explanation of how core.autocrlf works is found on the gitattributes man page, in the text attribute section. This is how core.autocrlf appears to work currently (or at least since v1.7.2 from what I am aware): core.autocrlf = true Text files checked-out from the repository that have only LF characters are normalized to CRLF … Read more