I agree Paul, I wasn&#39;t sure that dash was/wasn&#39;t compliant.&nbsp; It is the default with the latest Ubuntu for /bin/sh, which means busybox builds don&#39;t work on Ubuntu by default.&nbsp; <br><br>Since the question was raised about posix compliance, I decided to go look it up.&nbsp; Here is what I found:
<br><br>Here are the posix specs:<br>(free registration required)<br><br>Here is the main link:<br><a href="http://www.unix.org/single_unix_specification/">http://www.unix.org/single_unix_specification/</a><br><br>here are some direct links:
<br><a href="http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html#tag_02_02">http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html#tag_02_02</a><br><a href="http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html#tag_02_06_03">
http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html#tag_02_06_03</a><br><a href="http://www.opengroup.org/onlinepubs/000095399/utilities/echo.html">http://www.opengroup.org/onlinepubs/000095399/utilities/echo.html
</a><br>
<br>Here are some excerpts for consideration:<br><br>2.6.3 Command Substitution<br>&quot;Within the backquoted style of command substitution, backslash shall retain its literal meaning, except when followed by:
<tt>&#39;$&#39;</tt>, <tt>&#39;`&#39;</tt>, or <tt>&#39;\&#39;</tt> (dollar sign, backquote, backslash). <br>...<br>A single-quoted or double-quoted string that begins, but does not end, within the <tt>&quot;`...`&quot;</tt>

sequence produces undefined results.&quot;<br><br>so a single &quot; or &#39; is undefined behavior within a backquote command substitution and cannot be escaped with a backslash.<br><br>echo:<br>&quot;It is not possible to use 
<i>echo</i> portably across all POSIX systems unless both <b>-n</b> (as the first argument) and escape
sequences are omitted.&quot;<br><br><p>&quot;The following operands shall be supported:</p>

<dl compact="compact"><dt><i>string</i></dt><dd>A string to be written to standard output. If the first operand is <b>-n</b>, or if any of the operands contain a backslash (
<tt>&#39;\&#39;</tt> ) character, the results are implementation-defined.</dd><dt>...<br></dt><dt><tt>&nbsp;&nbsp;&nbsp; \n</tt></dt><dd>Write a &lt;newline&gt;.</dd><dt>...<br></dt></dl>&quot;<br><br>So in the POSIX specs, the echo operand is not necessarily quoted, and a &quot;\n&quot; is SUPPOSED to be printed as a newline, unless the &quot;-n&quot; option is used (in which case backslash escapes are implementation specific), so according to the spec technically bash and bbox ash are non-compliant because they print the \n instead of the newline.
<br><br><p>&quot;New applications are encouraged to use <a href="http://www.opengroup.org/onlinepubs/009695399/utilities/printf.html"><i>printf</i></a> instead of <i>echo</i>.&quot;</p>


<h4><a name="tag_04_41_17"></a></h4>&quot;<br><blockquote>
<p>The <i>echo</i> utility has not been made obsolescent because of its extremely widespread use in historical applications.
Conforming applications that wish to do prompting without &lt;newline&gt;s or that could possibly be expecting to echo a <b>-n</b>,
should use the <a href="http://www.opengroup.org/onlinepubs/009695399/utilities/printf.html"><i>printf</i></a> utility derived from the Ninth Edition system.</p>

<p>As specified, <i>echo</i> writes its arguments in the simplest of ways. The two different historical versions of <i>echo</i>
vary in fatally incompatible ways.</p>

<p>The BSD <i>echo</i> checks the first argument for the string <b>-n</b> which causes it to suppress the &lt;newline&gt; that
would otherwise follow the final argument in the output.</p>

<p>The System V <i>echo</i> does not support any options, but allows escape sequences within its operands, as described for XSI
implementations in the OPERANDS section.</p>

<p>The <i>echo</i> utility does not support Utility Syntax Guideline 10 because historical applications depend on <i>echo</i> to
echo <i>all</i> of its arguments, except for the <b>-n</b> option in the BSD version.</p>
</blockquote>

<h4>&quot;</h4><h4><a name="tag_04_41_19"></a></h4><div><span class="gmail_quote"><br>Regardless of all of this (or perhaps this is a good demonstration) - quoting is complicated and it is probably a good idea to avoid it when possible.&nbsp; An echo &quot;`...`&quot; command substitution seems a little like calling &quot;a = strtofloat(floattostr(b));&quot; instead of directly &quot;a=b;&quot;
<br><br><br>On 2/3/07, <b class="gmail_sendername">Paul Fox</b> &lt;<a href="mailto:pgf@brightstareng.com">pgf@brightstareng.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
vapier wrote:<br> &gt; On Saturday 03 February 2007, Brion Finlay wrote:<br> &gt; &gt; The fix that could be made to scripts/mkconfigs in order to work more<br> &gt; &gt; generally<br> &gt;<br> &gt; another fix would be to use a POSIX compliant shell ... then there wouldn&#39;t
<br> &gt; be problem<br> &gt; -mike<br> &gt;<br><br>we had the same problem with a different build system when we<br>moved it to ubuntu.&nbsp;&nbsp;i did some googling at the time, but<br>couldn&#39;t find a definitive answer -- i expected to find a lot of
<br>discussion on it somewhere in ubuntu-land, since it&#39;s a pretty<br>big change, but i didn&#39;t.&nbsp;&nbsp;it&#39;s not clear to me that dash isn&#39;t<br>posix compliant, at least with regard to echo&#39;s expanding &#39;\n&#39;.
<br>but it might not be.&nbsp;&nbsp;is there a &quot;dash is/isn&#39;t POSIX&quot; discussion<br>page out there anywhere?<br><br>in our case it was expedient (and safe) to simply replace<br>&quot;#!/bin/sh&quot; with &quot;#!/bin/bash&quot;, but that&#39;s probably not
<br>appropriate for busybox.<br><br>paul<br>=---------------------<br> paul fox, <a href="mailto:pgf@brightstareng.com">pgf@brightstareng.com</a><br>_______________________________________________<br>busybox mailing list<br>
<a href="mailto:busybox@busybox.net">busybox@busybox.net</a><br><a href="http://busybox.net/cgi-bin/mailman/listinfo/busybox">http://busybox.net/cgi-bin/mailman/listinfo/busybox</a><br></blockquote></div><br>