用上面的命令提示awk: syntax error at source line 1 context is { print >>> \ <<< $1 } awk: illegal statement at source line 1 xargs: Unknown option 'I' (see "xargs --help") xargs: Unknown option 'I' (see "xargs --help")
时间: 2024-03-27 12:38:52 浏览: 312
command line option syntax error
抱歉,我之前的命令有误,可能是由于终端不同导致的。以下是适用于大多数Linux终端的修正后的命令:
1. 对于 'USBDebuggingService':
```
adb shell "dumpsys power | grep 'USBDebuggingService' | awk '{print \$1}' | xargs -I {} adb shell \"dumpsys power | grep {} | grep 'PARTIAL_WAKE_LOCK' | awk '{print \$1}' | xargs -I {} adb shell \"dumpsys power wake_lock {} && echo 'Wake lock {} released.'\""
```
2. 对于 'setupwraith::wake_service':
```
adb shell "dumpsys power | grep 'setupwraith::wake_service' | awk '{print \$1}' | xargs -I {} adb shell \"dumpsys power | grep {} | grep 'SCREEN_BRIGHT_WAKE_LOCK' | awk '{print \$1}' | xargs -I {} adb shell \"dumpsys power wake_lock {} && echo 'Wake lock {} released.'\""
```
请尝试使用修正后的命令,如果还有问题,请告诉我。
阅读全文