ubuntu12.04中shell脚本无法使用source的原因及解决方法
执行命令:source ./.bashrc 提示错误信息:
-sh: 27: source: not found
原因: ls -l `which sh` 提示/bin/sh -> dash
这说明是用dash来进行解析的。
改回方法:
命令行执行:sudo dpkg-reconfigure dash
在界面中选择no
再ls -l `which sh` 提示/bin/sh -> bash
修改成功,source可以用了~
备注:最好是重新登录后再执行source命令
-sh: 27: source: not found
猜你喜欢
转载自songjianyong.iteye.com/blog/2238207
今日推荐
周排行