html tool

2013年4月7日星期日

quickbulid use 脚本总结 问题的回答



问题:
设置变量时在字符未总是有\r,每次都多加一个进去,赋值操作,echo操作都会有,why?    

[回答:开始文件是在windows中创建编写的,此文件传入linux下运行就有这个问题,
参见来源:http://stackoverflow.com/questions/11616835/cgywin-r-command-not-found-bashrc-bash-profile

This command might help when you see error messages like this:
-bash: $'then\r': command not found
Windows style newline characters often cause issues in Cygwin.
The?dos2unix?command modifies newline characters so they are Unix / Cygwin compatible.
NOTE:?the dos2unix command modifies files?in place, so take precaution if necessary.
If you need to keep the original file, you should back it up first.     
[popexizhi:接受教训吧,以后shell在linux 和windows中脚本混用编辑一定要避免啊!]

没有评论:

发表评论