Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 657

Command line getting occurrences of text within brackets following a specificword=

$
0
0

I am trying to get some specific text from logcat. It could be repeating multiple times. Example content would be:

..., stateEventTime=2025-01-09T17:22:05.635Z)], specificword=[SpecificWord(displayTimestamp=2024-06-01T00:00:00Z, LanguageCode=US English, ScreenId=ABC1-1, EventTime=2025-01-29T19:20:16.521Z)], status=status(more....

The problem is when I grep specificword, I am given too much json data to easily visually parse, as I only care about what is within specificword. Note, the brackets could be empty, such as:

specificword=[]

I would love to do the following:

adb logcat | grep my.app | command

And received something like the following:

specificword=[SpecificWord(displayTimestamp=2024-06-01T00:00:00Z, LanguageCode=US English, ScreenId=ABC0-0, EventTime=2025-01-29T19:20:16.521Z)]specificword=[]

Thanks for the help!


Viewing all articles
Browse latest Browse all 657

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>