Skip to content

Instantly share code, notes, and snippets.

@jkomyno
Created August 5, 2016 08:25
Show Gist options
  • Save jkomyno/621e7a1d8b48337d437b31134bd0b3b0 to your computer and use it in GitHub Desktop.
Save jkomyno/621e7a1d8b48337d437b31134bd0b3b0 to your computer and use it in GitHub Desktop.
This bash line will find any occurence of <Tag /> and will replace it by <Tag></Tag>
cat file.xml | sed -e "s/<\([^>]*\) \/>/<\1><\/\1>/g" > newfile.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment