shell - Linux - win10 拷贝shell 脚本到Linux 执行报错 -bash: ./myshell.sh: /bin/bash^M: bad interpreter: No such file or directory
win10 拷贝shell 脚本到Linux 执行报错 -bash: ./myshell.sh: /bin/bash^M: bad interpreter: No such file or directory
win10编辑器容易添加一些看不见的转义内容进去
怎么办???
很简单
执行指令 【文件换成自己的】
sed -i "s/\r//" myshell.sh
本文来自博客园,作者:岑惜,转载请注明原文链接:https://www.cnblogs.com/c2g5201314/p/15780525.html
响应开源精神相互学习,内容良币驱除劣币