In Microsoft Windows, Launched Cygwin terminal mode and running a little bash shell script.
But, getting the error “$’\r’: command not found”
The \r is a dead giveaway, as it means there is something amiss with Line Character and Carriage Return.
- Launched Notepad++
- Load the Bash Script File
- Access the menu items “Edit\EOL Conversion\Unix Format”
- Re-save file (File \ Save)
Addendum – Thursday July 10th, 2014
Please try the following StackOverflow Q/A postings:
They discuss using dos2unix to accomplish same thing. Crediting Roman Hocke and “me_and“.