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

 时间:2024-11-05 05:23:46

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脚本怎么调试
  • 热门搜索
    脖子短适合什么发型 瞻仰的近义词 回顾的近义词 欢声笑语的近义词 蓬松发型 我的世界怎么远程联机 合拢的近义词 窗帘怎么安装 淘宝买到假货怎么办 银行流水怎么做