I have about 1200 xml files I need to deploy from a 6.4 XML version to 9.0 version of a DTD. So I need a sed command to do lots of of replacements of random variables.
The keyword line is <AUTOEDIT EXP then is will have a variable followed by an equals sign. From that point on I need to break the line again.
Example
<AUTOEDIT EXP="%%S_APP_HOME=APP_HOME=%%G_APP_HOME_PREFIX.pmt/apb"/>
SED to
<VARIABLE NAME="%%S_APP_HOME" VALUE="APP_HOME=%%G_APP_HOME_PREFIX.pmt/apb" />
I know the last part but I'm stuck on how to handle the unknown variable name part. So its carried over on the replace.