linux shell怎么实现android自动化测试问题。

#!/bin/bash

adb shell am start -a android.intent.action.MAIN -n com.unioncreator.box/.ui.AdActivity ###开启APP
adb shell input tap 163 257 ###点击提交按钮

说明:提交成功后,logcat上会打印有"submit success"输出。
现在我想先从logcat中抓取到提交成功"submit success"后,再执行后面其他操作。
这块要怎么写。

不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^