Link to home
Start Free TrialLog in
Avatar of IKeystone
IKeystoneFlag for United States of America

asked on

Replace string inside block

Hi,
I have file with a lot of blocks like below:

 <a
   id="LISTENER_E"
   xlink:href=""
   transform="matrix(0.62637352,0,0,0.33836976,-278.11964,466.9526)">
   <image
   id="LISTENER_E.image"
   xlink:href="/images/Mobile/Icons/Catalog_Grey_4.png"
   height="65"
   width="65"
   y="502.32147"
   x="1087.6489" />
</a>

I have variables with name like id : LISTENER_E=Red

What I need:
According to variable name, replace "Grey" with variable value  into corresponding block
and do it without tmp files (like sed -i)
ASKER CERTIFIED SOLUTION
Avatar of simon3270
simon3270
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial