标题: [文本处理] 批处理命令FINDSTR字符太长,怎么办 [打印本页]
作者: hentai87 时间: 2020-7-18 13:10 标题: 批处理命令FINDSTR字符太长,怎么办
运行结果
===unknown Phh-Treble with GApps (CQ3001HFUG)===
ACTIVITY com.android.launcher3/.Launcher 64550c8 pid=2573
FINDSTR: Line 4 is too long.- @echo off
- ::adb临时加入到path环境变量
- set My_PATH=%~dp0
- set PATH=%PATH%;%My_PATH%
- @for /f "skip=1 usebackq" %%i in (`adb devices`) do call:print_deviceInfo %%i
- pause
- goto :eof
-
- :print_deviceInfo
-
- for /f "tokens=1 usebackq" %%i in (`adb -s %1 shell getprop ro.product.manufacturer`) do set manufacturer=%%i
-
- for /f "tokens=1,2,3 usebackq" %%i in (`adb -s %1 shell getprop ro.product.model`) do set model=%%i %%j %%k
-
- echo ===%manufacturer% %model% (%1)===
-
- adb -s %1 shell dumpsys activity top|findstr ACTIVITY
-
- echo.
-
- goto :eof
复制代码
作者: went 时间: 2020-7-18 14:07
调powershell- powershell -c " adb -s %1 shell dumpsys activity top | Where-Object { $_ -cmatch 'ACTIVITY' } "
复制代码
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |