ubuntu中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可以用了~
原文:
cnblogs.com/PhoenixMY/p/5537928.html