Display exact matches only with grep

ou need a more specific expression. Try grep ” OK$” or grep “[0-9]* OK”. You want to choose a pattern that matches what you want, but won’t match what you don’t want. That pattern will depend upon what your whole file contents might look like. You can also do: grep -w “OK” which will only match a whole word “OK”, … Read more

How to pretty print XML from the command line?

This utility comes with libxml2-utils: Perl’s XML::Twig This command comes with XML::Twig perl module, sometimes xml-twig-tools package: xmlstarlet This command comes with xmlstarlet: tidy Check the tidy package: Python Python’s xml.dom.minidom can format XML (works also on legacy python2): saxon-lint You need saxon-lint: saxon-HE You need saxon-HE: