adb shell cat data/proclog> ./b.txt 2>&1
findstr -in "Error" ./b.txt
IF %ERRORLEVEL% EQU 0 TASKKILL /F /IM cmd.exe
 
 
%ERRORLEVEL%   >>>>  环境变数,用来判断 findstr 是否找到,找到字串为 0 ,反之为1
 
findstr -i  >>>搜寻并显示关键字串的行字串
 
findstr -n  >>>显示关键字串的行数
 
TASKKILL /F /IM cmd.exe  >>>> Kill process 用来终止继续做 Loop test 和 logcat
相关文章