line 2 r command not found
This is very common exception while using Cygwin and running shell script file. Below is details of exception:
line 2: $’\r’: command not found
- Solution: This happens when you run *.sh extension file using Cygwin where it does not recognize file format and treat as window format and you get error if file has any new blank line in it. Best way to fix this issue is to convert file into Unix format.
- If already using Notepad++ open file from it and if not download from here (Its open source)
- Click Edit –> EOL Conversion –> UNIX/OSX Format –> Save file
- This will change file format to Unix and issue should be fixed.