« Coder's Toolbox | Main | Piping content through SSH »
Friday
Dec302011

"grep -o" - really quite useful 

One really quite useful command is “grep -o” - it allows you to fire off something like this:

grep -o "Location supplier=\"\w*\"" locations.xml

And the output will be the phrases matching the regular expressions that start with “Location supplier=” with a double quoted word (\w) in the locations.xml file. :-) 

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>