syntax error: unexpected end of file解决方法
2015-03-23 22:35
375 查看
syntax error: unexpected end of file解决方法
在windows环境下编辑的脚本通过Xftp上传到linux系统执行的时候会提示syntax error: unexpected end of file,脚本并没有错误。原因是:
在Windows环境下编辑的脚本在linux下会因为回车符的不通导致文件格式出错。
解决的办法之一:
notepad++编辑器在Windows环境下将文本转换为Unix格式,步骤为:用Notepad++打开脚本文件,编辑——档案格式转换——选择转换为UNIX格式,保存之后上传到linux服务器执行脚本就不会出现错误提示。也可参考网上的其他方法
在windows环境下编辑的脚本通过Xftp上传到linux系统执行的时候会提示syntax error: unexpected end of file,脚本并没有错误。原因是:
在Windows环境下编辑的脚本在linux下会因为回车符的不通导致文件格式出错。
解决的办法之一:
notepad++编辑器在Windows环境下将文本转换为Unix格式,步骤为:用Notepad++打开脚本文件,编辑——档案格式转换——选择转换为UNIX格式,保存之后上传到linux服务器执行脚本就不会出现错误提示。也可参考网上的其他方法
相关文章推荐
- PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法
- PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法
- 在执行shell脚本时,出现“syntax error : unexpected end of file"错误的解决方法
- Parse error: syntax error, unexpected end of file in *.php on line * 解决方法
- bin/sh -c:line 1 Syntax Error:unexpected end of file的解决方法
- bin/sh -c:line 1 Syntax Error:unexpected end of file的解决方法
- PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法
- 关于Qt for Android 编译时出错/usr/bin/sh: -c: line 1: syntax error: unexpected end of file 时的解决方法
- VC++6.0中常出现的"unexpected end of file while looking for precompiled header directive"的问题解决方法
- VC++6.0中"unexpected end of file while looking for precompiled header directive"的解决方法
- 解决shell错误:syntax error: unexpected end of file
- 解决shell错误:syntax error: unexpected end of file
- 【问题解决】syntax error: unexpected end of file或-bash: ./full_build.sh: /bin/bash^M: bad interpreter: No
- 出现此问题的解决方法: unexpected end of file while looking for precompiled header directive
- Unexpected end of file while looking for precompiled header directive 解决方法
- 总结一些关于fatal error RC1004: unexpected end of file found错误的解决方法
- bash: /home/x/.bash_profile: line 48: syntax error: unexpected end of file的解决
- 配置NDK syntax error: unexpected end of file 解决
- 配置NDK Cygwin .bash_profile:行47: 语法错误: 未预期的文件结尾 syntax error: unexpected end of file 解决
- Parse error: syntax error, unexpected end of file in * 的解决办法