I'm trying to do very likely to this post but instead of reading from a file I want to "subscribe" to the output of adb logcat
and every time a new line is logged I will run some code on this line.
I tried these codes, but none worked
tail -f $(adb logcat) | while read; do
echo $read;
processLine $read;
done
or
adb logcat >> logcat.txt &
tail -f logcat.txt | while read; do
echo $read;
processLine $read;
done
What is the simples way to do this? Thanks in advance