我需要以下一些幫助:bash:通過procces輸出循環並終止進程
我使用linux腳本命令發送到設備。我需要提交一個grep logcat命令給設備,然後在生成它的輸出時迭代它並查找特定的字符串。一旦找到這個字符串,我希望我的腳本移動到下面的命令。
在僞
for line in "adb shell logcat | grep TestProccess"
do
if "TestProccess test service stopped" in line:
print line
print "TestService finished \n"
break
else:
print line
done
它的工作原理非常感謝您的幫助! – Nikl 2013-03-05 13:36:17