syntax error: unexpected end of file windows linux换行 文件格式
来源:互联网 发布:10天学会单片机 编辑:程序博客网 时间:2024/06/05 14:21
从window拷贝shell文件到linux执行时报错: syntax error: unexpected end of file
原因:文件格式的问题,window以doc格式存储,linux以unix格式存储。
在windows里,换行用的两个符号,回车换/r行符号/n,在linux下只需一个符号/n就可以了.
解决方法:
1、用vi 打开shell文件,输入
: set ff?
可查看到文件格式,如果文件格式是doc,则需要更改成unix格式
:set ff=unix
然后
: wq
保存即可。
2、在ultraedit里点击 File Menu->Conventions->DOS to Unix,保存,问题解决。
DOS->Unix: Use this command to convert the file to a UNIX format.
- syntax error: unexpected end of file windows linux换行 文件格式
- Linux Shell syntax error: unexpected end of file
- linux-shell syntax error: unexpected end of file
- syntax error: unexpected end of file
- syntax error: unexpected end of file
- shell:syntax error:unexpected end of file
- syntax error: unexpected end of file解决方法
- syntax error:unexpected end of file
- syntax error: unexpected end of file
- syntax error, unexpected end of file
- syntax error near unexpected token 和 Linux Shell syntax error: unexpected end of file
- SHELL syntax error:unexpected end of file 提示错误; windows下修改linux文件导致linux文件无法使用
- Parse error: syntax error, unexpected end of file in
- Parse error: syntax error, unexpected end of file
- SHELL syntax error:unexpected end of file 提示错误
- Shelll 错误 syntax error: unexpected end of file
- Shelll 错误 syntax error: unexpected end of file
- shell中出现syntax error: unexpected end of file
- 一日总结之2012-08-26 Sun.
- 我的大二总结
- java中常见数据库字段类型与java.sql.Types的对应
- git使用详细介绍
- ldd3 文章列表
- syntax error: unexpected end of file windows linux换行 文件格式
- sparsehash项目
- Android中文语音合成(TTS)各家引擎对比
- 优化大师带来的灾难及redo重建-oracle数据库恢复
- ADS编译ARM程序时对RO,RW,ZI段的理解
- 海量数据处理--倒排索引
- TTS技术简单介绍和Ekho(余音)TTS的安装与编程
- Linker error calling C-Function from Objective-C++
- 我的纯HTML网页(汽车网页)