September 16th, 2006 mysurface Posted in grep, Text Manipulation | Hits: 13378 | 2 Comments »
Usually if you want to search for string with specific keyword, you use grep.
cat /etc/passwd | grep root
This will list all lines with keyword “root” .
What if you want to list all entry without keyword “root” ?
cat /etc/passwd | grep -v root
grep multiple keywords, AND not ORThis morning, I asked to analyze log files where I need to grep the lines with two keywords, and the post grep based on...
Matching Whole Word in GrepIs "grep" capable to match a whole word? The answer of cause is yes!!
grep -w "keyword" filename
this will only displa...
“Number” Manipulation in Grep"grep" will able to display the lines match with keyword or non-keyword (using option "-v"), but you may want to continu...
May 29th, 2011 at 8:07 am
I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here frequently. I’m quite sure I will learn many new stuff right here! Best of luck for the next!
May 31st, 2011 at 9:25 pm
I do agree with all the ideas you’ve presented in your post. They’re very convincing and will certainly work. Still, the posts are too short for novices. Could you please extend them a little from next time? Thanks for the post.