<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: running sed inside script file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894397#M771601</link>
    <description>A subtle difference, just to be consistent&lt;BR /&gt;with what I stated earlier you can do:&lt;BR /&gt;&lt;BR /&gt;To do it from unix prompt outside your script:&lt;BR /&gt;sed -e 's!&lt;POLICYSPACE name="\(.*\)"&gt;!&lt;POLICY&gt;&lt;OBJ&gt;&lt;POLICY&gt;\1&lt;/POLICY&gt;&lt;/OBJ&gt;!' &amp;lt; test.sed&lt;BR /&gt;&lt;BR /&gt;Where test.sed contains:&lt;BR /&gt;&lt;POLICYSPACE name="file"&gt;&lt;BR /&gt;&lt;BR /&gt;after it looks like this:&lt;BR /&gt;&lt;POLICY&gt;&lt;OBJ&gt;&lt;POLICY&gt;file&lt;/POLICY&gt;&lt;/OBJ&gt;&lt;BR /&gt;&lt;BR /&gt;From within the script with vi mode :&lt;BR /&gt;1,$s!&lt;POLICYSPACE name="\(.*\)"&gt;!&lt;POLICY&gt;&lt;OBJ&gt;&lt;POLICY&gt;\1&lt;/POLICY&gt;&lt;/OBJ&gt;!g&lt;BR /&gt;&lt;BR /&gt;exactly the same result :)&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;&lt;/POLICY&gt;&lt;/POLICYSPACE&gt;&lt;/POLICY&gt;&lt;/POLICYSPACE&gt;&lt;/POLICY&gt;&lt;/POLICYSPACE&gt;</description>
    <pubDate>Wed, 08 Nov 2006 09:46:44 GMT</pubDate>
    <dc:creator>Frank de Vries</dc:creator>
    <dc:date>2006-11-08T09:46:44Z</dc:date>
    <item>
      <title>running sed inside script file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894392#M771596</link>
      <description>i am substituting text in some xml file using sed, on shell directly its working fine, but when i do it using script file, it says, the function cant be parsed, i think the problem is due to xml file special characters, plz help</description>
      <pubDate>Wed, 08 Nov 2006 01:32:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894392#M771596</guid>
      <dc:creator>Bajaj</dc:creator>
      <dc:date>2006-11-08T01:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: running sed inside script file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894393#M771597</link>
      <description>Try escaping it. comething like this.-"\?\"</description>
      <pubDate>Wed, 08 Nov 2006 01:49:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894393#M771597</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-11-08T01:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: running sed inside script file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894394#M771598</link>
      <description>Inside shell vi mode &lt;BR /&gt;try&lt;BR /&gt;&lt;BR /&gt;:1,$s!&lt;YOUROLDSTUFF&gt;!&lt;YOURNEWSTUF&gt;!g&lt;BR /&gt;&lt;BR /&gt;So from line 1 to end ($)&lt;BR /&gt;using not backspaces but exlaimation marks !&lt;BR /&gt;g means global, throughout the whole script.&lt;BR /&gt;Escape U do undo if unexpected result.&lt;BR /&gt;&lt;BR /&gt;This should normally solve most quoting problems.&lt;BR /&gt;&lt;BR /&gt;Otherwise give the exact text you want to change inside the script.&lt;BR /&gt;&lt;BR /&gt;&lt;/YOURNEWSTUF&gt;&lt;/YOUROLDSTUFF&gt;</description>
      <pubDate>Wed, 08 Nov 2006 02:41:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894394#M771598</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-11-08T02:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: running sed inside script file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894395#M771599</link>
      <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;without really encrypting the script fragment you supplied, I suggest to try (its a single line!):&lt;BR /&gt;&lt;BR /&gt;sed 's,&lt;POLICYSPACE name="\(.*\)"&gt;,&lt;POLICYSPACE&gt;&lt;OBJ&gt;&lt;POLICY&gt;\1&lt;/POLICY&gt;&lt;/OBJ&gt;,'  in.xml &amp;gt;out.xml&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;/POLICYSPACE&gt;&lt;/POLICYSPACE&gt;</description>
      <pubDate>Wed, 08 Nov 2006 06:33:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894395#M771599</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-11-08T06:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: running sed inside script file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894396#M771600</link>
      <description>&lt;!--!*#--&gt;Sorry,&lt;BR /&gt;&lt;BR /&gt;there is a copy/paste error inside - use:&lt;BR /&gt;&lt;BR /&gt;sed 's,&lt;POLICYSPACE name="\(.*\)"&gt;,&lt;POLICY&gt;&lt;OBJ&gt;&lt;POLICY&gt;\1&lt;/POLICY&gt;&lt;/OBJ&gt;,'  in.xml &amp;gt;out.xml&lt;BR /&gt;&lt;BR /&gt;to get the xml tags you requested.&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;/POLICY&gt;&lt;/POLICYSPACE&gt;</description>
      <pubDate>Wed, 08 Nov 2006 06:38:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894396#M771600</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-11-08T06:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: running sed inside script file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894397#M771601</link>
      <description>A subtle difference, just to be consistent&lt;BR /&gt;with what I stated earlier you can do:&lt;BR /&gt;&lt;BR /&gt;To do it from unix prompt outside your script:&lt;BR /&gt;sed -e 's!&lt;POLICYSPACE name="\(.*\)"&gt;!&lt;POLICY&gt;&lt;OBJ&gt;&lt;POLICY&gt;\1&lt;/POLICY&gt;&lt;/OBJ&gt;!' &amp;lt; test.sed&lt;BR /&gt;&lt;BR /&gt;Where test.sed contains:&lt;BR /&gt;&lt;POLICYSPACE name="file"&gt;&lt;BR /&gt;&lt;BR /&gt;after it looks like this:&lt;BR /&gt;&lt;POLICY&gt;&lt;OBJ&gt;&lt;POLICY&gt;file&lt;/POLICY&gt;&lt;/OBJ&gt;&lt;BR /&gt;&lt;BR /&gt;From within the script with vi mode :&lt;BR /&gt;1,$s!&lt;POLICYSPACE name="\(.*\)"&gt;!&lt;POLICY&gt;&lt;OBJ&gt;&lt;POLICY&gt;\1&lt;/POLICY&gt;&lt;/OBJ&gt;!g&lt;BR /&gt;&lt;BR /&gt;exactly the same result :)&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;&lt;/POLICY&gt;&lt;/POLICYSPACE&gt;&lt;/POLICY&gt;&lt;/POLICYSPACE&gt;&lt;/POLICY&gt;&lt;/POLICYSPACE&gt;</description>
      <pubDate>Wed, 08 Nov 2006 09:46:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-sed-inside-script-file/m-p/3894397#M771601</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-11-08T09:46:44Z</dc:date>
    </item>
  </channel>
</rss>

