I know this question has been asked before, I just can't seem to get the correct syntax for my sed command.
I need to replace OPP/com.user.opp.orchest.po.services.stub-npo/npo-stub
with OPP/com.user.opp.orchest.po.services.stub-ica/npo-ica
A snippet of the file I am replacing it is the following:
config.xml
<compareType>PLAIN</compareType>
<pattern>
OPP/com.user.opp.orchest.po.services.stub-npo/npo-stub
</pattern>
<branches>
<com.sonyuser.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
<compareType>ANT</compareType>
<pattern>master</pattern>
</com.sonyuser.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch>
</branches>
${REPO_MIRROR}/OPP/com.user.opp.orchest.po.services.stub-npo/npo-stub
I have tried the following,
sed -i '/^\/OPP/\com.user.opp.orchest.po.services.stub-npo/\npo-stub\/OPP/\com.user.opp.orchest.po.services.stub-ica/\npo-ica/g' config.xml