Murmur of a rookie software engineer came from Taiwan.
(Sorry for my poor English, I just practice it here.)
Please feel free to contact me for anything: ninna.tw@gmail.com
2012年10月31日 星期三
[bash] $'\r': command not found
Error:
I got message below when I execute a bash script.
D:/asmbin/gnuasm: line 2: $'\r': command not found
D:/asmbin/gnuasm: line 4: $'\r': command not found
Solution:
It is caused by end of line is Windows style '\n\r'
Unix think the eol should be '\n'
Mac think the eol should be '\r'
The bash is unix environment, so we have to change '\n\r' to 'n'.
I use notepad++ as editor to fix the script.
Reference:
http://stackoverflow.com/questions/11616835/cgywin-r-command-not-found-bashrc-bash-profile
http://chunshucaca.blog.163.com/blog/static/6045100020082317363713/
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言