#!/bin/sh
source scripts/common.sh
现象: 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可以用了~
#!/bin/sh
source scripts/common.sh
现象: 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可以用了~
上一篇:Java中的语法糖
下一篇:jQuery 技术揭秘
Linq
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M