<?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 sed string replacement in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-string-replacement/m-p/4975719#M783533</link>
    <description>Hi there,&lt;BR /&gt;&lt;BR /&gt;Suppose a text file contains records such as:&lt;BR /&gt;12345,"47,835.33",abc,…&lt;BR /&gt;&lt;BR /&gt;How can I remove the optional double-quote enclosure and thousand separator so as to transform it to:&lt;BR /&gt;12345,47835.33,abc,…&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Simon&lt;BR /&gt;</description>
    <pubDate>Wed, 26 Apr 2006 09:46:50 GMT</pubDate>
    <dc:creator>Camel_1</dc:creator>
    <dc:date>2006-04-26T09:46:50Z</dc:date>
    <item>
      <title>sed string replacement</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-string-replacement/m-p/4975719#M783533</link>
      <description>Hi there,&lt;BR /&gt;&lt;BR /&gt;Suppose a text file contains records such as:&lt;BR /&gt;12345,"47,835.33",abc,…&lt;BR /&gt;&lt;BR /&gt;How can I remove the optional double-quote enclosure and thousand separator so as to transform it to:&lt;BR /&gt;12345,47835.33,abc,…&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Simon&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Apr 2006 09:46:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-string-replacement/m-p/4975719#M783533</guid>
      <dc:creator>Camel_1</dc:creator>
      <dc:date>2006-04-26T09:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: sed string replacement</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-string-replacement/m-p/4975720#M783534</link>
      <description>Hi Simon:&lt;BR /&gt;&lt;BR /&gt;Try:&lt;BR /&gt;&lt;BR /&gt;# perl -ple 's/"(\d+),(\d+\.)(\d+)"/\1\2\3/;s/"//g' filename&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 26 Apr 2006 10:03:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-string-replacement/m-p/4975720#M783534</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-04-26T10:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: sed string replacement</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-string-replacement/m-p/4975721#M783535</link>
      <description>Demat Simon,&lt;BR /&gt;&lt;BR /&gt;I assume that your filename is toto :&lt;BR /&gt;&lt;BR /&gt;sed -e 's/\"//g' -e 's/\.//g' toto&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;Kenavo&lt;BR /&gt;Pat</description>
      <pubDate>Wed, 26 Apr 2006 10:28:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-string-replacement/m-p/4975721#M783535</guid>
      <dc:creator>Patrice Le Guyader</dc:creator>
      <dc:date>2006-04-26T10:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: sed string replacement</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-string-replacement/m-p/4975722#M783536</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;my solution is in awk:&lt;BR /&gt;&lt;BR /&gt;awk -F, -v quo='"' '/"[0-9,.]*"/  {startq=0;str="";for (i=1;i&amp;lt;=NF;i++) {if($i ~ quo) {startq=!startq;&lt;BR /&gt;sub(quo,"",$i)}&lt;BR /&gt;str=str""$i;if(!startq &amp;amp;&amp;amp; (i&lt;NF&gt;&lt;/NF&gt;print str;next}&lt;BR /&gt;{print}' TEXTFILE&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Wed, 26 Apr 2006 10:38:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-string-replacement/m-p/4975722#M783536</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-04-26T10:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: sed string replacement</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-string-replacement/m-p/4975723#M783537</link>
      <description>thanks</description>
      <pubDate>Wed, 26 Apr 2006 12:30:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-string-replacement/m-p/4975723#M783537</guid>
      <dc:creator>Camel_1</dc:creator>
      <dc:date>2006-04-26T12:30:46Z</dc:date>
    </item>
  </channel>
</rss>

