Linux执行.sh文件,提示No such file or directory的问题的解决方法

Linux执行.sh文件,提示No such file or directory的问题的解决方法

window平台下修改了shell脚本文件,迁移到linux平台,赋过可执行权限,执行该sh文件,

却提示No such file or directory。


文件格式兼容性问题,用vim打开该sh文件,输入:
:set ff  
回车,显示fileformat=dos,重新设置下文件格式:
:set ff=unix  
保存退出:
[plain]
:wq  

猜你喜欢

转载自zhijin.iteye.com/blog/2422310