"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. :-)

Published . Filed under Other code. Tagged grep unix utilities

« Piping content through SSH Gawking out »