window 新建sh 文件在 linux 无法执行

在window上面新建的sh文件在linux执行失败,检查原因主要是window创建的sh文件格式是dos,linux执行的sh文件格式需要unix格式。
如何查看sh文件格式:

$ vim test.sh
> :set ff

如何修改sh文件格式:

$ vim test.sh
> :set ff=unix
> :wq
posted @ 2020-12-09 16:07  兜兜转转便是空  阅读(524)  评论(0编辑  收藏  举报