最近在使用bat,遇到了这样的问题,获取adb shell cat命令之后的所有返回值,查了很长时间,才找到,现分享给大家。
举例如下:
@for /f "tokens=*" %%i in (‘adb shell cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies‘) do @set vars=%%i
@echo All cpufreqs are: %var%
@for %%A in (%var%) do set last=%%A
@echo The max cpufreq is: %last%
结果是:
All cpufreqs are: 416000 900000 1050000
The max cpufreq is is:1050000
时间: 2024-10-03 22:29:02