shell脚本中source aaa.sh时提示 source: not found

来源:互联网 发布:网络直播招聘范文 编辑:程序博客网 时间:2024/06/05 15:57

现象: shell脚本中source aaa.sh时提示 source: not found


原因: 

<span style="font-family: Arial;">ls -l `which sh` </span>

提示/bin/sh -> dash

这说明是用dash来进行解析的。

改回方法: 

命令行执行:

sudo dpkg-reconfigure dash

在界面中选择no

<span style="font-family: Arial;">ls -l `which sh` </span>

提示/bin/sh -> bash

修改成功,source可以用了~


0 0