问题是,上传上去的脚本编码会有问题,老报 syntax error: unexpected end of file
搜索之,找到了
http://hi.baidu.com/homappy/item/f0ac0ce34ddb30acce2d4f74
vi dos.txt
:set fileformat=unix
:w
或者用dos2unix 工具也可以!
转成uninx的格式即可,so easy ,妈妈再也不用担心脚本在linux下出现乱码问题了
2014-06-08 10:22:16
现在发现,跟git的一个配置有关系。
设置一下就ok了。
git config --global core.autocrlf false