0
点赞
收藏
分享

微信扫一扫

一个有意思的bash、sh报错

whiteMu 2022-02-20 阅读 108

linux、shell脚本遇到的坑


在写shell脚本的时候,遇到这个报错:
-bash: ./test.sh: bin/bash: bad interpreter: No such file or directory


本以为是因为在windows编辑的,复制过来文件格式变了,网上各种改格式的教程搞鼓半天也没出来。
最后发现是shell脚本的抬头少了一个斜杠!!!

在这里插入图片描述

修改后完美运行!

在这里插入图片描述

 在这里插入图片描述

 

举报

相关推荐

0 条评论