<?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: help with sed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed/m-p/3952573#M761114</link>
    <description>Hi Steve,&lt;BR /&gt;&lt;BR /&gt;This is the command I used &lt;BR /&gt;&lt;BR /&gt; echo $staging_product_load | sed -e 's/'"|ALL|"'/'"$cntry"'' &amp;gt;&amp;gt; file.txt&lt;BR /&gt;&lt;BR /&gt;I am using it inside a shell script, and its a C shell&lt;BR /&gt;but its giving me error &lt;BR /&gt;sed: Function s/|ALL|/BP cannot be parsed.</description>
    <pubDate>Wed, 28 Feb 2007 01:10:04 GMT</pubDate>
    <dc:creator>chinnaga</dc:creator>
    <dc:date>2007-02-28T01:10:04Z</dc:date>
    <item>
      <title>help with sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed/m-p/3952571#M761112</link>
      <description>Hi Guys,&lt;BR /&gt;&lt;BR /&gt;I am trying to read a line and replace 2nd occourring string using sed, but I am not able to do it. Can u pls help me with this. Or is there any other way I can do it.&lt;BR /&gt;&lt;BR /&gt;here is the senario.&lt;BR /&gt;echo 00015-90002ALL|N|CE|ALL|IN|19981001|120540| ...now I want to replace this |ALL| with some other string.&lt;BR /&gt;&lt;BR /&gt;The end result should be something like this.&lt;BR /&gt;&lt;BR /&gt;00015-90002ALL|N|CE|AB|IN|19981001|120540|</description>
      <pubDate>Wed, 28 Feb 2007 00:19:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed/m-p/3952571#M761112</guid>
      <dc:creator>chinnaga</dc:creator>
      <dc:date>2007-02-28T00:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: help with sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed/m-p/3952572#M761113</link>
      <description>&lt;!--!*#--&gt;td176&amp;gt; echo '00015-90002ALL|N|CE|ALL|IN|19981001|120540|' | sed -e 's/|ALL|/|ab|/'&lt;BR /&gt;00015-90002ALL|N|CE|ab|IN|19981001|120540|&lt;BR /&gt;&lt;BR /&gt;As you've show it, only the second "ALL" is&lt;BR /&gt;bounded by "|" on both sides, so replace that&lt;BR /&gt;whole thing ("|ALL|").</description>
      <pubDate>Wed, 28 Feb 2007 00:51:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed/m-p/3952572#M761113</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-02-28T00:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: help with sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed/m-p/3952573#M761114</link>
      <description>Hi Steve,&lt;BR /&gt;&lt;BR /&gt;This is the command I used &lt;BR /&gt;&lt;BR /&gt; echo $staging_product_load | sed -e 's/'"|ALL|"'/'"$cntry"'' &amp;gt;&amp;gt; file.txt&lt;BR /&gt;&lt;BR /&gt;I am using it inside a shell script, and its a C shell&lt;BR /&gt;but its giving me error &lt;BR /&gt;sed: Function s/|ALL|/BP cannot be parsed.</description>
      <pubDate>Wed, 28 Feb 2007 01:10:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed/m-p/3952573#M761114</guid>
      <dc:creator>chinnaga</dc:creator>
      <dc:date>2007-02-28T01:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: help with sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed/m-p/3952574#M761115</link>
      <description>&lt;!--!*#--&gt;&amp;gt; sed: Function s/|ALL|/BP cannot be parsed.&lt;BR /&gt;&lt;BR /&gt;Missing the final "/".  Also, you seem to&lt;BR /&gt;have gone a little nuts with the quotation.&lt;BR /&gt;How about this (assuming that "$cntry"&lt;BR /&gt;doesn't have the vertical bars already)?:&lt;BR /&gt;&lt;BR /&gt;echo "$staging_product_load" | sed -e "s/|ALL|/|$cntry|/"&lt;BR /&gt;&lt;BR /&gt;Of course, if you expect a lot of exotic&lt;BR /&gt;characters in the strings, more complicated&lt;BR /&gt;quotation could be needed.&lt;BR /&gt;&lt;BR /&gt;td176&amp;gt; cntry=ab&lt;BR /&gt;td176&amp;gt; echo "00015-90002ALL|N|CE|ALL|IN|19981001|120540|" | sed -e "s/|ALL|/|$cntry|/"&lt;BR /&gt;00015-90002ALL|N|CE|ab|IN|19981001|120540|</description>
      <pubDate>Wed, 28 Feb 2007 01:21:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed/m-p/3952574#M761115</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-02-28T01:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: help with sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed/m-p/3952575#M761116</link>
      <description>Thanks  a lot Steve,&lt;BR /&gt;&lt;BR /&gt;I solved the problem ...now its working. I made minor modification from u'r previous reply. Its working fine.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot.</description>
      <pubDate>Wed, 28 Feb 2007 01:26:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-sed/m-p/3952575#M761116</guid>
      <dc:creator>chinnaga</dc:creator>
      <dc:date>2007-02-28T01:26:48Z</dc:date>
    </item>
  </channel>
</rss>

