<?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: Echo and backslash in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129589#M449477</link>
    <description>Basically should should treat backslash as a character only to used to quote other chars. :-)&lt;BR /&gt;&lt;BR /&gt;One thing about quoted strings, you'll need to double up backslashes in "" vs ''.&lt;BR /&gt;So one would think that this would work:&lt;BR /&gt;echo "123\\\\abc"&lt;BR /&gt;echo '123\\abc'&lt;BR /&gt;&lt;BR /&gt;Unfortunately this doesn't work because echo then has its own rules about backslashes.</description>
    <pubDate>Sat, 13 Sep 2008 01:49:06 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2008-09-13T01:49:06Z</dc:date>
    <item>
      <title>Echo and backslash</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129582#M449470</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;I'd like to produce the echo below:&lt;BR /&gt;&lt;BR /&gt;123\\abc&lt;BR /&gt;&lt;BR /&gt;I've tried echo "123\\abc" or "123\\\\abc"without succes ! &lt;BR /&gt;&lt;BR /&gt;Any Idea ?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Den</description>
      <pubDate>Fri, 12 Sep 2008 12:22:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129582#M449470</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2008-09-12T12:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Echo and backslash</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129583#M449471</link>
      <description>Hi Den:&lt;BR /&gt;&lt;BR /&gt;echo "123\\\\\\\\abc"&lt;BR /&gt;123\\abc&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 12 Sep 2008 12:26:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129583#M449471</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-09-12T12:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Echo and backslash</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129584#M449472</link>
      <description>dy # echo '123\\abc'&lt;BR /&gt;123\\abc&lt;BR /&gt;&lt;BR /&gt;dy # echo "123\\\\abc"&lt;BR /&gt;123\\abc&lt;BR /&gt;&lt;BR /&gt;dy # uname -a&lt;BR /&gt;HP-UX dy B.11.11 U 9000/785 2012616114 unlimited-user license&lt;BR /&gt;&lt;BR /&gt;Of course, that's using bash.  With /bin/sh,&lt;BR /&gt;it seems to be harder.&lt;BR /&gt;&lt;BR /&gt;dy # echo "123"'\\\\'"abc"&lt;BR /&gt;123\\abc</description>
      <pubDate>Fri, 12 Sep 2008 12:35:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129584#M449472</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-09-12T12:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Echo and backslash</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129585#M449473</link>
      <description>in "sh"&lt;BR /&gt;&lt;BR /&gt;echo "123\\\\\\acb"&lt;BR /&gt;&lt;BR /&gt;works as well.</description>
      <pubDate>Fri, 12 Sep 2008 13:11:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129585#M449473</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2008-09-12T13:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Echo and backslash</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129586#M449474</link>
      <description>Hi (again) Den:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Steven: Of course, that's using bash. With /bin/sh, it seems to be harder.&lt;BR /&gt;&lt;BR /&gt;...and without rancor, I would have to say that since this is HP-UX it's fair to assume that we should be using the *standard* HP-UX shell ('/usr/bin/sh' or '/sbin/sh').  The bash shell's handling of backslashes in its implementation of 'echo' differs significantly.&lt;BR /&gt;&lt;BR /&gt;On an 11.11 machine:&lt;BR /&gt;&lt;BR /&gt;# echo ${SHELL}&lt;BR /&gt;/sbin/sh&lt;BR /&gt;# echo "123\\abc"&lt;BR /&gt;123bc&lt;BR /&gt;# echo "123\\\\abc"&lt;BR /&gt;123\abc&lt;BR /&gt;# echo "123\\\\\\\\abc"&lt;BR /&gt;123\\abc&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Sep 2008 13:18:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129586#M449474</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-09-12T13:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Echo and backslash</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129587#M449475</link>
      <description>Thanks !</description>
      <pubDate>Fri, 12 Sep 2008 14:01:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129587#M449475</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2008-09-12T14:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Echo and backslash</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129588#M449476</link>
      <description>&amp;gt; ...and without rancor, I would have to say&lt;BR /&gt;&amp;gt; that since this is HP-UX it's fair to&lt;BR /&gt;&amp;gt; assume that we should be using the&lt;BR /&gt;&amp;gt; *standard* HP-UX shell ('/usr/bin/sh' or&lt;BR /&gt;&amp;gt; '/sbin/sh').&lt;BR /&gt;&lt;BR /&gt;Assume what you wish, but "should" is your&lt;BR /&gt;opinion.  Bash runs on HP-UX, too, however.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;  The bash shell's handling of&lt;BR /&gt;&amp;gt; backslashes in its implementation of 'echo'&lt;BR /&gt;&amp;gt; differs significantly.&lt;BR /&gt;&lt;BR /&gt;No argument there.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; # echo ${SHELL}&lt;BR /&gt;&amp;gt; /sbin/sh&lt;BR /&gt;&lt;BR /&gt;Not a good test.&lt;BR /&gt;&lt;BR /&gt;dy # echo "123\\\\abc"&lt;BR /&gt;123\\abc&lt;BR /&gt;dy # echo $SHELL&lt;BR /&gt;/sbin/sh&lt;BR /&gt;&lt;BR /&gt;SHELL is not guaranteed to agree with the&lt;BR /&gt;current shell.</description>
      <pubDate>Fri, 12 Sep 2008 14:26:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129588#M449476</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-09-12T14:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Echo and backslash</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129589#M449477</link>
      <description>Basically should should treat backslash as a character only to used to quote other chars. :-)&lt;BR /&gt;&lt;BR /&gt;One thing about quoted strings, you'll need to double up backslashes in "" vs ''.&lt;BR /&gt;So one would think that this would work:&lt;BR /&gt;echo "123\\\\abc"&lt;BR /&gt;echo '123\\abc'&lt;BR /&gt;&lt;BR /&gt;Unfortunately this doesn't work because echo then has its own rules about backslashes.</description>
      <pubDate>Sat, 13 Sep 2008 01:49:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-and-backslash/m-p/5129589#M449477</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-09-13T01:49:06Z</dc:date>
    </item>
  </channel>
</rss>

