Skip to content

Instantly share code, notes, and snippets.

@iaverypadberg
Last active April 26, 2022 14:43
Show Gist options
  • Save iaverypadberg/23175250430cedbf7f7f1ac4266620ec to your computer and use it in GitHub Desktop.
Save iaverypadberg/23175250430cedbf7f7f1ac4266620ec to your computer and use it in GitHub Desktop.
Find a specific tags in an xml file with grep using regular exressions
# You can substitute out the tags for andy tags you like.
# The ".*" in the center of each tag specifies that any characters with any length can exist inside the tag
cat *.xml | grep -o -e "<name>.*<\/name>\|<filename>.*<\/filename>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment