<?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: Script help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2937324#M929124</link>
    <description>Sorry, Frank - at first glance I thought they were the same.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
    <pubDate>Thu, 27 Mar 2003 15:30:14 GMT</pubDate>
    <dc:creator>Pete Randall</dc:creator>
    <dc:date>2003-03-27T15:30:14Z</dc:date>
    <item>
      <title>Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2937321#M929121</link>
      <description>Hi all, &lt;BR /&gt;&lt;BR /&gt;In a file, I want add a string "CC" 2 lines before a know string "C". &lt;BR /&gt;&lt;BR /&gt;Ex.: &lt;BR /&gt;&lt;BR /&gt;My original file is : &lt;BR /&gt;&lt;BR /&gt;A &lt;BR /&gt;B &lt;BR /&gt;??? --&amp;gt; unknown string &lt;BR /&gt;C &lt;BR /&gt;D &lt;BR /&gt;&lt;BR /&gt;The result would be : &lt;BR /&gt;&lt;BR /&gt;A &lt;BR /&gt;B &lt;BR /&gt;CC&lt;BR /&gt;??? &lt;BR /&gt;C &lt;BR /&gt;D &lt;BR /&gt;&lt;BR /&gt;How I do this with awk.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance. &lt;BR /&gt;&lt;BR /&gt;Frank &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Mar 2003 15:00:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2937321#M929121</guid>
      <dc:creator>Francois Bariselle_3</dc:creator>
      <dc:date>2003-03-27T15:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2937322#M929122</link>
      <description>See this thread:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x982ab941255cd71190080090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x982ab941255cd71190080090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 27 Mar 2003 15:06:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2937322#M929122</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-03-27T15:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2937323#M929123</link>
      <description>Hi Frank:&lt;BR /&gt;&lt;BR /&gt;Well, this case is the cousin of your other thread.  This will work:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;sed '/^B/{&lt;BR /&gt;n&lt;BR /&gt;iCC&lt;BR /&gt;}' filename&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 27 Mar 2003 15:26:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2937323#M929123</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-03-27T15:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2937324#M929124</link>
      <description>Sorry, Frank - at first glance I thought they were the same.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 27 Mar 2003 15:30:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2937324#M929124</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-03-27T15:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2937325#M929125</link>
      <description>And what should&lt;BR /&gt;&lt;BR /&gt;A&lt;BR /&gt;B&lt;BR /&gt;C&lt;BR /&gt;C&lt;BR /&gt;A&lt;BR /&gt;C&lt;BR /&gt;&lt;BR /&gt;turn in to?&lt;BR /&gt;&lt;BR /&gt;A&lt;BR /&gt;CC&lt;BR /&gt;B&lt;BR /&gt;CC&lt;BR /&gt;C&lt;BR /&gt;C&lt;BR /&gt;CC&lt;BR /&gt;A&lt;BR /&gt;C&lt;BR /&gt;&lt;BR /&gt;?&lt;BR /&gt;&lt;BR /&gt;if there is no such conflicts possible,&lt;BR /&gt;&lt;BR /&gt;l1:/tmp 106 &amp;gt; cat xx&lt;BR /&gt;A&lt;BR /&gt;B&lt;BR /&gt;??? --&amp;gt; unknown string&lt;BR /&gt;C&lt;BR /&gt;D&lt;BR /&gt;l1:/tmp 107 &amp;gt; perl -ne'@p&amp;gt;1&amp;amp;&amp;amp;print shift@p;/C/&amp;amp;&amp;amp;print"CC\n";push@p,$_}END{print@p' xx&lt;BR /&gt;A&lt;BR /&gt;B&lt;BR /&gt;CC&lt;BR /&gt;??? --&amp;gt; unknown string&lt;BR /&gt;C&lt;BR /&gt;D&lt;BR /&gt;l1:/tmp 108 &amp;gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Thu, 27 Mar 2003 15:54:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2937325#M929125</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-03-27T15:54:39Z</dc:date>
    </item>
  </channel>
</rss>

