source : not found 原因及解决办法


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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM