shell脚本出现bad interpreter:No such file or directory怎么办?
自己写的shell脚本出现了bad interpreter:No such file or directory,如果确认脚本没有问题,那有可能是脚本的格式出现了问题,可以进入shell脚本(vim shell脚本),按exit键用:set ff进行检查,如果出现fileformat=dos,那就是shell脚本的格式出现了问题。可以使用以下方式进行解决:
vim shell脚本,然后按exit键,然后执行:set fileformat=unix,最后:wq或:x保存退出就可以使用了。