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

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




原文:http://blog.csdn.net/mvpme82/article/details/7615454

发布了54 篇原创文章 · 获赞 37 · 访问量 39万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章