Saturday 15 March 2014

xml - HP UX insert text to specific location -


I have a text file in HPUX and put me in some XML file in a specific location, for example, I After some text must be inserted

  & lt; Table name = "data" key = "CONTEXT_ID, USERNAME" & gt; ... my text here in   

I did this through 'sed' in Linux but in the same order there is an error in the huux, unable to parse ...

Please

In Linux, I have used this way

  sed '\ | & Lt; Table name = "MANAGED_USER" keys = "CONTEXT_ID, USERNAME" & gt; | A \ my text here 'file.xml & gt; & Gt; File1.xml   

I was looking for something similar in my shell script.

This article fixes my problem:

What I used to do:

  awk "/ pattern / {print" Your text here "} 1 '$ FILE & gt; / Tmp / patawk cp / tmp / patawk $ FILE rm / tmp / patawk    

No comments:

Post a Comment