报错内容
linux-source:not found
not found [[[
例如1.sh #!/bin/sh source /etc/profile 输出:source: not found 2.sh #!/bin/bash source /etc/profile 正常执行 3.source等价于 . 所以使用. /etc/profile都会执行正常 (注意点号后面空格)
运行 ls -l /bin/sh
后显示/bin/sh -> dash
ls -l /bin/sh
这说明是用dash来进行解析的。
命令行执行:
dpkg-reconfigure dash(注意需要root权限),然后在界面中选择no 再运行ls -l /bin/sh
后显示/bin/sh -> bash
dpkg-reconfigure dash
ls -l /bin/sh
linux-source: not found ubuntu执行脚本报错
原文:https://www.cnblogs.com/erlou96/p/13398387.html