Trouble editing ~/.bash_profile: -bash: $'\r': command not found

Posted by Dave on Super User See other posts from Super User or by Dave
Published on 2011-09-01T13:37:35Z Indexed on 2012/07/11 15:18 UTC
Read the original article Hit count: 345

Filed under:
|
|

I installed CygWin on Windows 7. Using Notepad, I edited my ~/.bash_profile file to add on to the PATH variable …

PATH="${PATH}:/cygdrive/c/apache-ant-1.8.2/bin"

Now, when I SSH in to my Windows machine, I get this error …

-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: /home/dev/.bash_profile: line 39: syntax error: unexpected end of file

and my PATH is not set. Anyone know how I can correct this?

© Super User or respective owner

Related posts about bash

Related posts about windows-7