Results 1 to 4 of 4
Hi everyone. I'm having trouble using these commands to their full extent. Here is my problem:
I'm dumping a log to the terminal and only want a specific set of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-22-2011 #1Just Joined!
- Join Date
- Nov 2011
- Posts
- 3
Using grep and sed
Hi everyone. I'm having trouble using these commands to their full extent. Here is my problem:
I'm dumping a log to the terminal and only want a specific set of lines that start withBut I want these lines without that junk in front of it. To display only the parts I want, I'm doing the log command piped with grep and sedCode:V/ CONTENT ( [some number]):
This leaves me with V/(stuff I want). I'm just not sure how to sed the V/ part out of it because in the sed command '/' symbols are used to separate fields. Anybody have an idea?Code:./adb logcat | grep CONTENT | sed -e 's/CONTENT ( [some number]):/ /g'
- 12-22-2011 #2
My knowledge of sed is shorter than it's name, so this is a bit of a guess... Have you tried escaping the '/' character in the string (ie put a '\' before the '/')?
Linux user #126863 - see http://linuxcounter.net/
- 12-22-2011 #3Just Joined!
- Join Date
- Nov 2011
- Posts
- 3
Worked perfectly. Cheers to you my man (or woman).
- 12-22-2011 #4Linux user #126863 - see http://linuxcounter.net/


1Likes
Reply With Quote

