-bash: $'\377\376if': command not found
-bash: $'then\r': command not found
: No such file or directorysu//.bashrc
-bash: /.bash_profile: line 3: syntax error near unexpected token `fi'
-bash: /cygdrive/c/Users/jhsu//.bash_profile: line 3: `fi'
-bash: '\r': command not found
原因:
Windows和Linux文本文件行尾符不同,windows使用的是CR+LF即 “\r\n”,而Linux使用的是LF即"\n",所以即使文件已经添加了可执行文件,该文件也无法被执行。
解决:
dos2unix filename
等待执行完成就可以了