linux、shell脚本遇到的坑
在写shell脚本的时候,遇到这个报错:
-bash: ./test.sh: bin/bash: bad interpreter: No such file or directory
本以为是因为在windows编辑的,复制过来文件格式变了,网上各种改格式的教程搞鼓半天也没出来。
最后发现是shell脚本的抬头少了一个斜杠!!!
修改后完美运行!
微信扫一扫
在写shell脚本的时候,遇到这个报错:
-bash: ./test.sh: bin/bash: bad interpreter: No such file or directory
本以为是因为在windows编辑的,复制过来文件格式变了,网上各种改格式的教程搞鼓半天也没出来。
最后发现是shell脚本的抬头少了一个斜杠!!!
修改后完美运行!
相关推荐