shell脚本dos格式转换成unix格式

 时间:2026-04-25 20:53:21

1、当在Linux系统执行一个.sh脚本时,提示报错

shell脚本dos格式转换成unix格式

2、这时候打开数据文件

shell脚本dos格式转换成unix格式

3、输入 :set ff 回车查看文件格式

shell脚本dos格式转换成unix格式

shell脚本dos格式转换成unix格式

4、显示文件格式是 dos,输入 :set ff=unix,回车修改文件格式

shell脚本dos格式转换成unix格式

5、修改完成后,保存退出

shell脚本dos格式转换成unix格式

6、再次执行脚本文件,成功执行。

shell脚本dos格式转换成unix格式

  • shell快速入门教程视频
  • 如何使用shell的Unix风格的ps命令
  • shell构建基本脚本
  • shell脚本报错“^M: bad interpreter”解决方法
  • shell脚本怎么调试
  • 热门搜索
    有什么动漫好看 24k金是什么意思 ws是什么意思 啪啪啪是什么意思 居士是什么意思 t波改变是什么意思 妆前乳的作用 sq是什么意思 始作俑者的意思 涅盘的意思