Created
October 25, 2018 04:36
-
-
Save raglin/bc7f0abef9fa80f6b6bceba078dcc9c1 to your computer and use it in GitHub Desktop.
find xml file, grep for tags and then print
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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