<?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: AWK/SED in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895056#M762013</link>
    <description>My two cents using ex(1) though I prefer Peter's solution:&lt;BR /&gt;&lt;BR /&gt;# ex -s +"/XYZ/r ABC | /XYZ/d | x" file</description>
    <pubDate>Wed, 08 Nov 2006 17:42:55 GMT</pubDate>
    <dc:creator>Sandman!</dc:creator>
    <dc:date>2006-11-08T17:42:55Z</dc:date>
    <item>
      <title>AWK/SED</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895054#M762011</link>
      <description>Here are certain conditions I need to fulfill&lt;BR /&gt;&lt;BR /&gt;1)Replace a particular filename by the contents of the file in a master file&lt;BR /&gt;&lt;BR /&gt;Tried it with sed but sed cudnt know how to replace the file contents something like&lt;BR /&gt;XYZ=srch pattern&lt;BR /&gt;ABC=FILE.&lt;BR /&gt;XYZ could be anywhere of course :)&lt;BR /&gt;&lt;BR /&gt;sed 's/XYZ/`cat ABC`/g'</description>
      <pubDate>Wed, 08 Nov 2006 17:07:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895054#M762011</guid>
      <dc:creator>opensource4all</dc:creator>
      <dc:date>2006-11-08T17:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: AWK/SED</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895055#M762012</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you where on the right path!&lt;BR /&gt;The first change for a solution would be to substitue the singlequotes to double quotes:&lt;BR /&gt;&lt;BR /&gt;1)  sed "s/XYZ/`cat ABC`/g"&lt;BR /&gt;&lt;BR /&gt;BUT: you have to keep in mind, that&lt;BR /&gt;a character "/" in the file content of 'ABC' will make the substitute pattern invalid because "/" is the pattern delimiter. You can use any character NOT in file ABC for this purpose, e.g.&lt;BR /&gt;&lt;BR /&gt;2)  sed "sÂ§XYZÂ§`cat ABC`Â§g"&lt;BR /&gt;&lt;BR /&gt;There is no need for spawning an extra 'cat' process in posix shells, use&lt;BR /&gt;&lt;BR /&gt;3)  sed "s/XYZ/$(&lt;ABC&gt;&lt;/ABC&gt;&lt;BR /&gt;Take extra care when ABC contains newlines.&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Nov 2006 17:18:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895055#M762012</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-11-08T17:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: AWK/SED</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895056#M762013</link>
      <description>My two cents using ex(1) though I prefer Peter's solution:&lt;BR /&gt;&lt;BR /&gt;# ex -s +"/XYZ/r ABC | /XYZ/d | x" file</description>
      <pubDate>Wed, 08 Nov 2006 17:42:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895056#M762013</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-11-08T17:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: AWK/SED</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895057#M762014</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# perl -pe 'if (s/XYZ//) {chomp;open(FH,"&amp;lt;","XYZ") or die;@a=&lt;FH&gt;;print @a}' ABC&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;/FH&gt;</description>
      <pubDate>Wed, 08 Nov 2006 17:47:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895057#M762014</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-11-08T17:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: AWK/SED</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895058#M762015</link>
      <description>Try&lt;BR /&gt;&lt;BR /&gt;export FILE=/path/nameofyourfile&lt;BR /&gt;&lt;BR /&gt;sed "s!XYZ!$(&amp;lt;$FILE)!g"&lt;BR /&gt;&lt;BR /&gt;When using " " quotes you can&lt;BR /&gt;embedd variables.</description>
      <pubDate>Thu, 09 Nov 2006 05:01:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895058#M762015</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-11-09T05:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: AWK/SED</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895059#M762016</link>
      <description>How many points should I assign to replies? &lt;BR /&gt;Every response to your question is eligible to earn between 1-10 points. No need to worry about running out of points - when a truly awesome reply rolls in that deserves a 10, you will be able to assign it a 10! However, be careful to assign points based on the value that a reply truly provides. Use the following scale as a guideline:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;o N/A: The answer was simply a point of clarification to my original question &lt;BR /&gt;&lt;BR /&gt;o 1-3: The answer didn't really help answer my question, but thanks for your assistance! &lt;BR /&gt;&lt;BR /&gt;o 4- 7: The answer helped with a portion of my question, but I still need some additional help! &lt;BR /&gt;&lt;BR /&gt;o 8-10: The answer has solved my problem completely! Now I'm a happy camper! &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Although assigning points is not mandatory, it is a key component of a strong, interactive community, and it is STRONGLY ENCOURAGED. Others have taken time to help you, so please take a moment to give them credit for their assistance!&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Jan 2007 07:42:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-sed/m-p/3895059#M762016</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2007-01-17T07:42:12Z</dc:date>
    </item>
  </channel>
</rss>

