shell 脚本怀疑是Windows文件格式的,Linux上执行报错:
bash bad interpreter: 没有那个文件或目录
解决方法:
vim filename
然后用命令
:set ff? #可以看到dos或unix的字样. 如果的确是dos格式的。
然后用
:set ff=unix#把它强制为unix格式的, 然后存盘退出。
再次运行脚本。
转自:csdn博客
shell 脚本怀疑是Windows文件格式的,Linux上执行报错:
bash bad interpreter: 没有那个文件或目录
解决方法:
vim filename
然后用命令
:set ff? #可以看到dos或unix的字样. 如果的确是dos格式的。
然后用
:set ff=unix#把它强制为unix格式的, 然后存盘退出。
再次运行脚本。
转自:csdn博客