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

 时间:2026-02-16 21:26:05

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脚本怎么调试
  • 热门搜索
    皆怎么读 微信怎么绑定qq 营运证怎么办理 我的世界地图怎么用 颈椎病怎么自我治疗 惠普电脑怎么样 鞋子磨脚怎么办 三文鱼怎么吃 项目简介怎么写 宫颈充血是怎么回事