現象: 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可以用了~
現象: 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可以用了~
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。