linux - Get adb log and grep it to a string in IF statement -
I want to grep a string for ADB logcat and if it matches, then it should go inside if the statement and Get out The following code is not working
if [./adb logcat | | Grep - line-buffered 'The monkey was canceled due to the error.' ]; Then Adeb Logcat-d & gt;
If you want to test the value of an expression, then you want to test whether or not a command is successful, or if you are testing the command line, then you can assign that command toif
. After put it.if ./adb logcat | Grep - line-buffered 'The monkey was canceled due to the error.' Then ... f
In addition to this, you should enter
if
and[
. There should be a space between .
Comments
Post a Comment