<?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: Problem with SED in shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870258#M821963</link>
    <description>I have faced many probs with sed it looks like this is the problem&lt;BR /&gt;&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;cat /tmp/new-httpd2.conf |sed -e "s;dummysslPort;$SSL_PORT;g" &amp;gt;&amp;gt;/tmp/new-httpd.conf&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It will work please give a try &lt;BR /&gt;&lt;BR /&gt;Cheers ............&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;kaps</description>
    <pubDate>Fri, 27 Dec 2002 08:56:57 GMT</pubDate>
    <dc:creator>KapilRaj</dc:creator>
    <dc:date>2002-12-27T08:56:57Z</dc:date>
    <item>
      <title>Problem with SED in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870250#M821955</link>
      <description>Hi friends,&lt;BR /&gt;&lt;BR /&gt;I have a strange problem with sed in shell scripts on HP-UX 11.0. &lt;BR /&gt;&lt;BR /&gt;The scripts is like this:&lt;BR /&gt;sed -e "s,dummyPort,$PORT,g" &amp;lt; /tmp/new-httpd1.conf &amp;gt;/tmp/new-httpd2.conf&lt;BR /&gt;&lt;BR /&gt;sed -e "s,dummysslPort,$SSL_PORT,g" &amp;lt; /tmp/new-httpd2.conf &amp;gt;/tmp/new-httpd.conf&lt;BR /&gt;&lt;BR /&gt;In the above two sed functions, first sed works fine. Second one gives the following error:&lt;BR /&gt;"sed: Function s,dummysslPort,443 cannot be parsed"&lt;BR /&gt;&lt;BR /&gt;I even tried the following:&lt;BR /&gt;&lt;BR /&gt;sed -e "s/a/b" -e "s/b/c" &amp;lt; file1 &amp;gt;file2. This also gives the same error. &lt;BR /&gt;&lt;BR /&gt;I even replaced -e with -n and tried. Still does not work. &lt;BR /&gt;&lt;BR /&gt;Any ideas? Please help. &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Nagendar</description>
      <pubDate>Thu, 26 Dec 2002 08:51:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870250#M821955</guid>
      <dc:creator>Nagendar</dc:creator>
      <dc:date>2002-12-26T08:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SED in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870251#M821956</link>
      <description>I had a similar problem I changed the last sed command to:&lt;BR /&gt;&lt;BR /&gt;    's/$/&lt;BR /&gt;'&lt;BR /&gt;&lt;BR /&gt;and the problem went away. I have no idea if that is a reasonable way&lt;BR /&gt;to fix it, though.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--chakri</description>
      <pubDate>Thu, 26 Dec 2002 09:02:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870251#M821956</guid>
      <dc:creator>Chakravarthi</dc:creator>
      <dc:date>2002-12-26T09:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SED in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870252#M821957</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;You mean to say replace double quotes (") with  with single quotes (') ?&lt;BR /&gt;&lt;BR /&gt;Yes, that works fine. But the problem is that takes the literal values. I mean you can't use a variable in that case. That is another side problem of using single quotes. &lt;BR /&gt;&lt;BR /&gt;Looking forward for more solutions. &lt;BR /&gt;Regards,&lt;BR /&gt;Nagendar</description>
      <pubDate>Thu, 26 Dec 2002 09:26:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870252#M821957</guid>
      <dc:creator>Nagendar</dc:creator>
      <dc:date>2002-12-26T09:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SED in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870253#M821958</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;Perhaps problems are not the same ...&lt;BR /&gt;&lt;BR /&gt;In the first case, what is the content of $SSL_PORT ? If it contains a ',' it could generate errors due to string evaluation before execution. Try with another separator like / or ; ...&lt;BR /&gt;&lt;BR /&gt;In your second sed problem, just add a final / and it will work (you must always have a third time the fiel separator.&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Thu, 26 Dec 2002 10:45:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870253#M821958</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2002-12-26T10:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SED in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870254#M821959</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The port does not contain the ",". &lt;BR /&gt;&lt;BR /&gt;Regarding the second suggetion, I have put the third file seperator too in the sed. It does not solve the problem :(&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 26 Dec 2002 14:19:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870254#M821959</guid>
      <dc:creator>Nagendar</dc:creator>
      <dc:date>2002-12-26T14:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SED in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870255#M821960</link>
      <description>Hi, the value of one of params was messed up. Hence the unusual behaviour. Thanks for the replies. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Dec 2002 15:22:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870255#M821960</guid>
      <dc:creator>Nagendar</dc:creator>
      <dc:date>2002-12-26T15:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SED in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870256#M821961</link>
      <description>Hi Nagendar,&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;sed -e 's/dummysslPort/'$SSL_PORT'/g' &amp;lt; /tmp/new-httpd2.conf &amp;gt;/tmp/new-httpd.conf &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Dec 2002 17:33:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870256#M821961</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-12-26T17:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SED in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870257#M821962</link>
      <description>Hi Justo,&lt;BR /&gt;&lt;BR /&gt;Thanks for the suggetion. My actual problem was with the value of SSL_PORT. There was some messup. Thats been resolved. Thanks anyway. &lt;BR /&gt;&lt;BR /&gt;I am closing the message now!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Nagendar&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 Dec 2002 04:26:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870257#M821962</guid>
      <dc:creator>Nagendar</dc:creator>
      <dc:date>2002-12-27T04:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SED in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870258#M821963</link>
      <description>I have faced many probs with sed it looks like this is the problem&lt;BR /&gt;&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;cat /tmp/new-httpd2.conf |sed -e "s;dummysslPort;$SSL_PORT;g" &amp;gt;&amp;gt;/tmp/new-httpd.conf&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It will work please give a try &lt;BR /&gt;&lt;BR /&gt;Cheers ............&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;kaps</description>
      <pubDate>Fri, 27 Dec 2002 08:56:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-sed-in-shell-script/m-p/2870258#M821963</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2002-12-27T08:56:57Z</dc:date>
    </item>
  </channel>
</rss>

