Skip to content

Instantly share code, notes, and snippets.

@raglin
Created October 25, 2018 04:36
Show Gist options
  • Select an option

  • Save raglin/bc7f0abef9fa80f6b6bceba078dcc9c1 to your computer and use it in GitHub Desktop.

Select an option

Save raglin/bc7f0abef9fa80f6b6bceba078dcc9c1 to your computer and use it in GitHub Desktop.
find xml file, grep for tags and then print
#Will print from an xml file the values from 2 tags like value1: value2
find . -name *xml -exec xml_grep --cond '#SOME XPATH#' --cond '#SOME OTHER XPATH#' {} \; | awk 'NR%2{printf "%s: ",$0;next;}1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment