码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2014-08-29 14:32:37      阅读:239      评论:0      收藏:0      [点我收藏+]

标签:使用   on   c   dp   as   ubuntu   r   方法   shell   

现象: 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可以用了~

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

标签:使用   on   c   dp   as   ubuntu   r   方法   shell   

原文地址:http://www.cnblogs.com/chengxin1982/p/3944792.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!