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萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章