Skip to content

Instantly share code, notes, and snippets.

@Aarbel
Created September 20, 2019 19:30
Show Gist options
  • Save Aarbel/dfc4719a26738b440e676dfa4bf70d89 to your computer and use it in GitHub Desktop.
Save Aarbel/dfc4719a26738b440e676dfa4bf70d89 to your computer and use it in GitHub Desktop.
Edit XML Tag attribute with sh bash or shell script.
sed -i '' "s/\(<tag_to_target [^>]*attribute_to_target=\"\)[^\"]*\"/\1$variable_to_set\"/" file.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment