安卓脚本判断运作的是不是root,su
使用到grep -q
if id|grep "uid=0" -q;then echo yes;else echo no;fi
if id|grep "uid=0" -q;then
echo yes;
else
echo no;
fi
grep -q
if id|grep "uid=0" -q;then echo yes;else echo no;fi
if id|grep "uid=0" -q;then
echo yes;
else
echo no;
fi