1***6@qq.com
deepin
2018-05-03 22:53 权限检查一下?
Reply Like 0 View the author
https://bbs.deepin.org/post/155960
今天终于发现问题在哪了。
rjsupplicant.sh设为可执行文件后,不能用sh命令执行。去掉sh后就好了。 ...
https://bbs.deepin.org/post/155960
不是吧同时脚本执行方式还能这么玩?
用的./xxx.sh??
https://bbs.deepin.org/post/155960
不是吧同时脚本执行方式还能这么玩?
用的./xxx.sh??
Popular Events
More
系统:最新升级后的deepin15.5
校园网使用有线连接的时候需要使用校园网提供的linux版客户端拨号,一年前使用的时候,还可以使用。
很久不用了,最近使用的时候总是运行出错。
使用如下命令查看帮助的时候
sh rjsupplicant.sh --help
显示出错信息如下
rjsupplicant.sh: 8: rjsupplicant.sh: Bad substitution
经百度和论坛检索,未查到有用信息,不知哪位大侠可以提供一些建议?
##########################################################
rjsupplicant.sh内容如下
#########################################################
#! /bin/bash
curDir=$(cd "$(dirname "$0")"; pwd);
arg="";
until [ $# -eq 0 ]
do
opt=$1;
if [ "${opt/ /}" != "$opt" ]; then
arg="$arg \"$opt\"";
else
arg="$arg $opt";
fi
shift
done
function is64BIT()
{
os=$(getconf LONG_BIT);
if [ $os != "64" ]; then
return 0;
fi
return 1;
}
function main()
{
is64BIT;
if [ $? != "1" ]; then
chmod +x $curDir/x86/rjsupplicant 2>&-;
cd $curDir/x86/
sh -c "$curDir/x86/rjsupplicant $arg";
else
chmod +x $curDir/x64/rjsupplicant 2>&-;
cd $curDir/x64/
sh -c "$curDir/x64/rjsupplicant $arg";
fi
}
main;
exit 0;