<div class="gmail_quote">On Thu, Sep 20, 2012 at 12:13 PM, Paul Eggleton <span dir="ltr">&lt;<a href="mailto:paul.eggleton@linux.intel.com" target="_blank">paul.eggleton@linux.intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

On Thursday 20 September 2012 11:44:39 Andrei Gherzan wrote:<br>
&gt; oe-core removed the prerequisite to have sh as bash. POSIX doesn&#39;t define<br>
&gt; any options and furthermore allows echo -e to be the default behavior.<br>
&gt; This means that in dash &quot;echo -e&quot; will actually print &quot;-e&quot; and interpret<br>
&gt; backslashes by default. We use instead &quot;printf&quot; builtin command with or<br>
&gt; without &quot;\n&quot; to simulate echo -e or echo -n.<br>
<br>
I haven&#39;t looked over the whole patch, but I did notice a couple of issues -<br>
printf does not behave exactly like echo in a couple of situations:<br>
<br>
 (a) if you supply no arguments printf will return an error whereas echo does<br>
not, this will probably break situations where you have changed the script to<br>
do &#39;printf &gt; /some/file&#39;. Since these statements are usually intended to create<br>
or truncate the specified file, I wonder if we should just change these to do &#39;&gt;<br>
/some/file&#39; instead which works for dash and bash (and doesn&#39;t otherwise appear<br>
to be a bashism).<br>
<br></blockquote><div><br></div><div>Already fixed. Patch was on the way. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 (b) &#39;printf &quot;\n&quot;&#39; will print just one newline, whereas echo -e &quot;\n&quot; prints<br>
two. Not sure if this is significant but I think we would rather keep the<br>
behaviour the same.<br><br></blockquote><div><br></div><div>I didn&#39;t notice this but you are right. Just tested... I will add this as well. Thank you.</div><div><br></div><div>ag</div></div>