您的位置:首页 > 运维架构 > Shell

ubuntu12.04中shell脚本无法使用source的原因及解决方法

2013-03-04 13:33 666 查看
现象: shell脚本中source aaa.sh时提示 source: not found

原因: ls -l `which sh` 提示/bin/sh -> dash

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

改回方法:

命令行执行:sudo dpkg-reconfigure dash

在界面中选择no

再ls -l `which sh` 提示/bin/sh -> bash

修改成功,source可以用了~
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: