<?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: Need help on scripting in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177171#M162227</link>
    <description>#sed -e 's/fruit/FRUIT NICE/g' &amp;lt;script-name&amp;gt;</description>
    <pubDate>Thu, 29 Jan 2004 02:02:43 GMT</pubDate>
    <dc:creator>T G Manikandan</dc:creator>
    <dc:date>2004-01-29T02:02:43Z</dc:date>
    <item>
      <title>Need help on scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177170#M162226</link>
      <description>Hi All, &lt;BR /&gt;&lt;BR /&gt;Please help on my scripting problem below.  On my script, I want to replace  all lines that contain a specific word to particular entry. For example, file1 contains :&lt;BR /&gt;&lt;BR /&gt;flower rose  red    &lt;BR /&gt;fruit  apple   sweet&lt;BR /&gt;fruit  orange  sweet&lt;BR /&gt;fruit  water melon not sweet&lt;BR /&gt;&lt;BR /&gt;Want to replace all lines that contain fruit with word ' FRUIT  NICE', so the target file will be as below:&lt;BR /&gt;&lt;BR /&gt;flower  rose red&lt;BR /&gt;FRUIT  NICE  &lt;BR /&gt;FRUIT  NICE&lt;BR /&gt;FRUIT  NICE&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Negara</description>
      <pubDate>Thu, 29 Jan 2004 01:57:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177170#M162226</guid>
      <dc:creator>Dewa Negara_4</dc:creator>
      <dc:date>2004-01-29T01:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177171#M162227</link>
      <description>#sed -e 's/fruit/FRUIT NICE/g' &amp;lt;script-name&amp;gt;</description>
      <pubDate>Thu, 29 Jan 2004 02:02:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177171#M162227</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2004-01-29T02:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177172#M162228</link>
      <description>sed /fruit/s/fruit/FRUIT\ NICE/g filename &amp;gt; filename.new&lt;BR /&gt;&lt;BR /&gt;mv filename.new filename&lt;BR /&gt;&lt;BR /&gt;-Karthik S S</description>
      <pubDate>Thu, 29 Jan 2004 02:06:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177172#M162228</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2004-01-29T02:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177173#M162229</link>
      <description># perl -pe'/\bfruit\b/i and$_="FRUIT NICE\n"' file&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;# perl -pe's/.*\bfruit\b.*/FRUIT NICE/i' file&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;TMTOWTDI&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Thu, 29 Jan 2004 02:07:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177173#M162229</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-01-29T02:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177174#M162230</link>
      <description>Thanks, but it gave me this output. &lt;BR /&gt;# sed -e 's/fruit/FRUIT NICE/g' file1&lt;BR /&gt;flower rose red&lt;BR /&gt;FRUIT NICE apple sweet&lt;BR /&gt;FRUIT NICE orange sweet&lt;BR /&gt;FRUIT NICE water melon not sweet&lt;BR /&gt;&lt;BR /&gt;It is now what I want. I want this output :&lt;BR /&gt;&lt;BR /&gt;flower rose red&lt;BR /&gt;FRUIT NICE &lt;BR /&gt;FRUIT NICE&lt;BR /&gt;FRUIT NICE&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2004 02:08:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177174#M162230</guid>
      <dc:creator>Dewa Negara_4</dc:creator>
      <dc:date>2004-01-29T02:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177175#M162231</link>
      <description>Thanks Karthik, &lt;BR /&gt;&lt;BR /&gt;But it gave me the output below. &lt;BR /&gt;&lt;BR /&gt;# sed /fruit/s/fruit/FRUIT\ NICE/g file1&lt;BR /&gt;flower rose red&lt;BR /&gt;FRUIT NICE apple sweet&lt;BR /&gt;FRUIT NICE orange sweet&lt;BR /&gt;FRUIT NICE water melon not sweet&lt;BR /&gt;&lt;BR /&gt;Please help. Thanks. &lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2004 02:11:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177175#M162231</guid>
      <dc:creator>Dewa Negara_4</dc:creator>
      <dc:date>2004-01-29T02:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177176#M162232</link>
      <description>Procura, &lt;BR /&gt;&lt;BR /&gt;Thanks. It looks fine. But it is possible use a shell sctipt instead of perl?&lt;BR /&gt;&lt;BR /&gt;Thanks. &lt;BR /&gt;&lt;BR /&gt;# perl -pe's/.*\bfruit\b.*/FRUIT NICE/i' file1&lt;BR /&gt;flower rose red&lt;BR /&gt;FRUIT NICE&lt;BR /&gt;FRUIT NICE&lt;BR /&gt;FRUIT NICE&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2004 02:13:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177176#M162232</guid>
      <dc:creator>Dewa Negara_4</dc:creator>
      <dc:date>2004-01-29T02:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177177#M162233</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;procura's answer works. sed and awk are not working</description>
      <pubDate>Thu, 29 Jan 2004 02:22:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177177#M162233</guid>
      <dc:creator>Ravi_8</dc:creator>
      <dc:date>2004-01-29T02:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177178#M162234</link>
      <description>Hi All, &lt;BR /&gt;&lt;BR /&gt;Thanks for your great help. It looks fine now. &lt;BR /&gt;&lt;BR /&gt;Thanks and Best Regards,&lt;BR /&gt;Dewa</description>
      <pubDate>Thu, 29 Jan 2004 02:26:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177178#M162234</guid>
      <dc:creator>Dewa Negara_4</dc:creator>
      <dc:date>2004-01-29T02:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177179#M162235</link>
      <description>Try this&lt;BR /&gt;&lt;BR /&gt;#sed -e '/^fruit/s/^.*$/FRUIT NICE/g' &lt;FILE&gt;&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;#sed -e '/fruit/s/^.*$/FRUIT NICE/g' &lt;FILE&gt;&lt;/FILE&gt;&lt;/FILE&gt;</description>
      <pubDate>Thu, 29 Jan 2004 02:27:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177179#M162235</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2004-01-29T02:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177180#M162236</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;this works also:&lt;BR /&gt;awk '/fruit/{print "FRUIT NICE";next}{print $0}' file&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2004 03:04:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-on-scripting/m-p/3177180#M162236</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2004-01-29T03:04:37Z</dc:date>
    </item>
  </channel>
</rss>

