I want to search (awk/grep/sed) into few XML files (pom.xml file) skipping some folder. Moreover,the first condition is that they must contain the tag
You can use xmllint to search for a node using xpath
xmllint
xmllint --xpath '//module' */pom.xml
Its return codes can tell you when it was found (0) or not (!= 0).
0
!= 0