On Sat, Oct 20, 2012 at 11:28 AM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":3v">printf is more portable. It should always be preferred over echo -e. If targeting bash/zsh/ksh<br>
<<<<<br>
<br>
is printf portable with bourne shell aswell? </div></blockquote><div><br>You have chosen to split the quote in a very peculiar way. Putting the sentences on separate lines should help clarify<br><br><i>'''<br>
printf is more portable.<br><br>It should always be preferred over echo -e.<br><br>If targeting bash/zsh/ksh specifically, echo $'...' is also ok.<br><br>If targeting zsh or ksh specifically, print is ok.</i></div>
<div><i>'''</i><br><br></div><div>Look at the table here: <a href="http://www.in-ulm.de/~mascheck/various/echo+printf/">http://www.in-ulm.de/~mascheck/various/echo+printf/</a></div><div>There hasn't been an OS without printf since the 1980s.</div>
<div><br></div><div>"New applications are encouraged to use printf instead of echo." <a href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html#tag_20_37_16">http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html#tag_20_37_16</a></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":3v">Because thats what we target.<br>
<br>
I don't really need '-e' there. Instead of<br>
<br>
>>><br>
mpif90 -show: ln -s /sandbox/petsc/software/mpich-1.2.7p1/include/mpif.h mpif.h<br>
ifort -L/sandbox/petsc/software/mpich-1.2.7p1/lib -lmpichf90 -lmpich -lpthread -lrt<br>
rm -f mpif.h<br>
<<<<br>
I can do with:<br>
<br>
>>><br>
mpif90 -show: ln -s /sandbox/petsc/software/mpich-1.2.7p1/include/mpif.h mpif.h (newline) ifort -L/sandbox/petsc/software/mpich-1.2.7p1/lib -lmpichf90 -lmpich -lpthread -lrt (newline) rm -f mpif.h<br>
<<<<br></div></blockquote></div><br>