<?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: Shell Scripting Help for find and replace in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059951#M719249</link>
    <description>for variable:&lt;BR /&gt;&lt;BR /&gt;VAR="xxx.yyy++.zzz"&lt;BR /&gt;sed -e 's/\./%2E/g' -e 's/+/%2B/g' $VAR&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hai</description>
    <pubDate>Fri, 29 Aug 2003 17:45:32 GMT</pubDate>
    <dc:creator>Hai Nguyen_1</dc:creator>
    <dc:date>2003-08-29T17:45:32Z</dc:date>
    <item>
      <title>Shell Scripting Help for find and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059947#M719245</link>
      <description>Hi All,&lt;BR /&gt;I have a file with list of strings from which I will create http URL's.&lt;BR /&gt;&lt;BR /&gt;I need to replace some special characters with URL encoding before I include them in the URL due to some limitations.&lt;BR /&gt;This is my requirement. I have file with following lines:&lt;BR /&gt;&lt;BR /&gt;xxx.yyy++.zzz&lt;BR /&gt;aaa.bb+cc.ddd&lt;BR /&gt;&lt;BR /&gt;I want to replace every "." with "%2E" and every "+" with %2B.&lt;BR /&gt;&lt;BR /&gt;How do I do that in shell scripts ?&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 29 Aug 2003 17:36:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059947#M719245</guid>
      <dc:creator>Praveen Hari</dc:creator>
      <dc:date>2003-08-29T17:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Scripting Help for find and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059948#M719246</link>
      <description>You can use sed-&lt;BR /&gt;&lt;BR /&gt;sed -e 's/\./%2E/g' -e 's/+/%2B/g' &lt;INFILE&gt;outfile&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills&lt;/INFILE&gt;</description>
      <pubDate>Fri, 29 Aug 2003 17:37:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059948#M719246</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2003-08-29T17:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Scripting Help for find and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059949#M719247</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Praveen,&lt;BR /&gt;&lt;BR /&gt;You can try this:&lt;BR /&gt;&lt;BR /&gt;# sed 's/\./%2E/g' original_file | sed 's/+/%2B/g' &amp;gt; new_file&lt;BR /&gt;&lt;BR /&gt;Hai</description>
      <pubDate>Fri, 29 Aug 2003 17:41:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059949#M719247</guid>
      <dc:creator>Hai Nguyen_1</dc:creator>
      <dc:date>2003-08-29T17:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Scripting Help for find and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059950#M719248</link>
      <description>If I have to do the same operation on a shell varaiable which has the contenet "xxx.yyy++.zzz" what will be the script ? can I just replace the file name with variable name ?</description>
      <pubDate>Fri, 29 Aug 2003 17:42:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059950#M719248</guid>
      <dc:creator>Praveen Hari</dc:creator>
      <dc:date>2003-08-29T17:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Scripting Help for find and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059951#M719249</link>
      <description>for variable:&lt;BR /&gt;&lt;BR /&gt;VAR="xxx.yyy++.zzz"&lt;BR /&gt;sed -e 's/\./%2E/g' -e 's/+/%2B/g' $VAR&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hai</description>
      <pubDate>Fri, 29 Aug 2003 17:45:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059951#M719249</guid>
      <dc:creator>Hai Nguyen_1</dc:creator>
      <dc:date>2003-08-29T17:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Scripting Help for find and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059952#M719250</link>
      <description>My example should read as follows:&lt;BR /&gt;&lt;BR /&gt;VAR="xxx.yyy++.zzz"&lt;BR /&gt;echo $VAR | sed -e 's/\./%2E/g' -e 's/+/%2B/g'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hai</description>
      <pubDate>Fri, 29 Aug 2003 17:46:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059952#M719250</guid>
      <dc:creator>Hai Nguyen_1</dc:creator>
      <dc:date>2003-08-29T17:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Scripting Help for find and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059953#M719251</link>
      <description>newstring=`echo $string | sed -e 's/... '`&lt;BR /&gt;&lt;BR /&gt;Note the backward quotes after the = and at the end. Do not include the input/output filenames.&lt;BR /&gt;&lt;BR /&gt;This will execute what's in the back quotes and return the result. This value is then put into variable "newstring".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Aug 2003 17:48:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059953#M719251</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2003-08-29T17:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Scripting Help for find and replace</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059954#M719252</link>
      <description>newstring=`echo $string | sed -e 's/... '`&lt;BR /&gt;&lt;BR /&gt;Note the backward quotes after the = and at the end. Do not include the input/output filenames.&lt;BR /&gt;&lt;BR /&gt;This will execute what's in the back quotes and return the result. This value is then put into variable "newstring".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Aug 2003 17:48:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting-help-for-find-and-replace/m-p/3059954#M719252</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2003-08-29T17:48:18Z</dc:date>
    </item>
  </channel>
</rss>

