【linux】Ubuntu中shell脚本无法使用source的原因及解决方法
2018-01-29 14:36
676 查看
问题现象: 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可以用了~
原因: ls -l `which sh` 提示/bin/sh -> dash
这说明是用dash来进行解析的。
改回方法:
命令行执行:sudo dpkg-reconfigure dash
在界面中选择no
再ls -l `which sh` 提示/bin/sh -> bash
修改成功,source可以用了~
相关文章推荐
- shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- debian中shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- Linux下使用Shell脚本获取终端宽度的解决方法
- [Ubuntu] Linux下使用google app engine,无法打开https网站的解决方法
- Notepad++编写的shell脚本在linux下无法执行的解决方法
- 170509、文本编辑器编写的shell脚本在linux下无法执行的解决方法
- ubuntu 使用sh 无法执行脚本文件的解决方法
- Linux下的Source Insight+Ubuntu 10.04使用Wine安装Source + wine 速度慢的解决方法
- linux crontab 无法执行shell脚本解决方法
- windows下编写的Shell脚本在Linux下运行错误的解决方法
- ubuntu下无法使用无线网络的解决方法