在Ubuntu 16.04機(jī)器在執(zhí)行shell腳本時(shí)毫捣,報(bào)source: not found
原因是shell腳本執(zhí)行的時(shí)候用的不是bash烙懦,而是dash,可以使用下面方法修改尉共。
$ls -l `which sh`
/bin/sh -> dash
$dpkg-reconfigure dash
出現(xiàn)對話框后侥加,選擇no捧存,再查看一次
$ls -l `which sh`
/bin/sh -> bash
重新執(zhí)行腳本,問題解決