Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Dredvard
Posts: 160
Registered: ‎01-27-2012
My Device: Playbook

Re: Unresolved symbol errors when attempting to load Weather Guesser demo on 10.0.9.388

Is there a method to have grep only display after the second white space? (including the package name makes it always wrap)

---
If you find my post helpful please "like" it and "accept as a solution"
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Unresolved symbol errors when attempting to load Weather Guesser demo on 10.0.9.388

There are lots of tricks you can play, but this being a Posix environment you probably want to learn how to use some of the other command line tools that are available, piping the results from one to the next to make a filter that does what you want.

 

Here's an example:

slog2info -w | grep qt-msg | sed -re 's/(\S+ +){6}//'

That ugly thing takes the real-time output of slog2info, extracts only those lines which have "qt-msg" in them, then strips off the first 6 groups that consist of one-or-more-non-space followed by one-or-more-space characters.  I picked the 6 so that it removes everything up to the first actual output from the app (following the "qt-msg   0  " portion of the line), though personally I find that removes too much. You might want to learn more about sed and leave a portion of the timestamp, for example, to make the output more useful.

 

The mess in single quotation marks is a "regular expression", for any rookies in the audience... if you aren't familiar with them, you really ought to learn so this is a good time to start.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.