Shell脚本判断手机连接网络状态
2017-02-07 本文已影响0人
lichao3140
@echo off
:start
for /f "tokens=*" %%a in ('adb shell ping -c 1 -w 1 192.168.255.2^|findstr from') do echo %time% %%a >>d:\ping.txt
ping -n 2 127.0.0.1
goto start
@echo off
:start
for /f "tokens=*" %%a in ('adb shell ping -c 1 -w 1 192.168.255.2^|findstr from') do echo %time% %%a >>d:\ping.txt
ping -n 2 127.0.0.1
goto start