On executing the following adb command with grep I get the following response in (darwin os) terminal. i count number of error after grep finds a "Error" string in response
adb -s derefedv645xxxxxx shell "am start -n com.samsung.networkui/.usa.EnhancedLteServices" | grep Error | wc -l
Output:
Error type 3
Error: Activity class {com.samsung.networkui/com.samsung.networkui.usa.EnhancedLteServices} does not exist.
0
Meaning there is no "Error" text in the response. why grep is not able to capture the text "Error" ? let me know if more information is required.