我试图在下面执行以下 shell 脚本
function Check_Status () {
if [[ "$(adb shell getprop sys.boot_completed)" =~ "adb: no devices/emulators found" ]];
then
echo "here"
else
echo "im here"
fi;
};
Check_Status
Run Code Online (Sandbox Code Playgroud)
我得到以下输出,我期待看到“这里”而不是“我在这里”
不确定会丢失什么