Re: [Fink-devel] echo -n now deprecated
On Dec 16, 2006, at 6:11 PM, Jean-François Mertens wrote: > > On 17 Dec 2006, at 02:38, David R. Morrison wrote: > >> The reason for the /bin has to do with behaviors of different >> shells in Tiger. Without writing /bin/echo, the 'echo' command is >> processed as a shell built-in, and the results are different for >> bash and tcsh. > You're completely right ! > But {Compile,Install,etc...}Script's are always executed under (ba) > sh, no ? > (unless the maintainer specifies differently, knowing what he is > doing...) I think the postinstall scripts are executed under the user's shell, though. And we've used this construction a lot in those scripts. Also, I believe that Tiger's tcsh mimics the POSIX behavior but Tiger's bash does not. So even if we relied on scripts being executed by bash, we would have trouble if the current bash is not POSIX-compliant. -- Dave - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] echo -n now deprecated
On 17 Dec 2006, at 04:44, Peter O'Gorman wrote: > > There is a /usr/bin/printf for shells where it is not available as a > builtin, so in tcsh printf works too, but it uses /usr/bin/printf. > > printf(1) behaves in a very similar way to the printf(3) function. > You can, for example do: > > % printf "The current user is %s\n" $USER > The current user is peter > > So, of course: > % printf "foo" > foo > > autoconf just switched to using printf instead of echo because its > behavior is similar on all platforms where it is available, echo's > behavior varies on different platforms (or in our case, on different > versions of the same platform :-p). > > Peter Nice explanation ! Thanks a lot ! Jean-Francois - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] echo -n now deprecated
> "David" == David R Morrison <[EMAIL PROTECTED]> writes: David> As mentioned on the new "preparing for 10.5" page on the fink wiki, David> echo -n is now deprecated in fink. I have edited the vast majority David> of packages where this occurs to conform to the new version. Instead of David>echo -n "string" David> one should now write David>/bin/echo "string\c" Well, this is a sad day. Ever since Unix V7 (the One True Unix), echo -n worked. The \c was introduced by the Sys3 (later Sys-V) cretins. Unfortunately, SysV was adopted as POSIX, more or less. It's sad that we're losing the legacy means. :( -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] echo -n now deprecated
On Dec 17, 2006, at 11:11 AM, Jean-François Mertens wrote: > >> It is also okay to use printf - >> >> % printf "string" >> >> http://www.opengroup.org/onlinepubs/95399/utilities/printf.html > > the doc cited is a bit painful to read through... > and 'man printf' doesn't show at all 9at first sight at least) > why the above construct should work... (as it does !). > But printf is a builtin, and `man bash` documents the construct > perfectly. There is a /usr/bin/printf for shells where it is not available as a builtin, so in tcsh printf works too, but it uses /usr/bin/printf. printf(1) behaves in a very similar way to the printf(3) function. You can, for example do: % printf "The current user is %s\n" $USER The current user is peter So, of course: % printf "foo" foo autoconf just switched to using printf instead of echo because its behavior is similar on all platforms where it is available, echo's behavior varies on different platforms (or in our case, on different versions of the same platform :-p). Peter - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] echo -n now deprecated
On 17 Dec 2006, at 02:00, Jean-François Mertens wrote: > I see coreutils is at version 6.7, vs 5.96 in fink. > If the maintainer were willing to update, I would hope the need for > the "/bin/" > to disappear ... ; there should be a way to write things > 'portably' (at least > across current versions of GNU and of Darwin...). > It is a bit of a shock to see coreutils behind darwin... > > JF Mertens > > On 17 Dec 2006, at 00:49, David R.Morrison wrote: > >> As mentioned on the new "preparing for 10.5" page on the fink wiki, >> echo -n is now deprecated in fink. I have edited the vast majority >> of packages where this occurs to conform to the new version. >> Instead of >> >>echo -n "string" >> >> one should now write >> >>/bin/echo "string\c" I was only referring to the fact that replacing '/bin/echo" by "%p/ bin/echo' would lead to an error _ and that I see no way to write the command in a way acceptable to both .. But, as you very rightly stressed, it is the (bash-)builtin echo that matters ... JF - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] echo -n now deprecated
On 17 Dec 2006, at 02:38, David R. Morrison wrote: > The reason for the /bin has to do with behaviors of different > shells in Tiger. Without writing /bin/echo, the 'echo' command is > processed as a shell built-in, and the results are different for > bash and tcsh. You're completely right ! But {Compile,Install,etc...}Script's are always executed under (ba) sh, no ? (unless the maintainer specifies differently, knowing what he is doing...) similar issue with pogma's : > It is also okay to use printf - > > % printf "string" > > http://www.opengroup.org/onlinepubs/95399/utilities/printf.html the doc cited is a bit painful to read through... and 'man printf' doesn't show at all 9at first sight at least) why the above construct should work... (as it does !). But printf is a builtin, and `man bash` documents the construct perfectly. JF - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] echo -n now deprecated
The reason for the /bin has to do with behaviors of different shells in Tiger. Without writing /bin/echo, the 'echo' command is processed as a shell built-in, and the results are different for bash and tcsh. -- Dave On Dec 16, 2006, at 5:00 PM, Jean-François Mertens wrote: > I see coreutils is at version 6.7, vs 5.96 in fink. > If the maintainer were willing to update, I would hope the need for > the "/bin/" > to disappear ... ; there should be a way to write things > 'portably' (at least > across current versions of GNU and of Darwin...). > It is a bit of a shock to see coreutils behind darwin... > > JF Mertens > > On 17 Dec 2006, at 00:49, David R.Morrison wrote: > >> As mentioned on the new "preparing for 10.5" page on the fink wiki, >> echo -n is now deprecated in fink. I have edited the vast majority >> of packages where this occurs to conform to the new version. >> Instead of >> >>echo -n "string" >> >> one should now write >> >>/bin/echo "string\c" >> >> (See "man echo".) This makes our use of echo POSIX compliant, and is >> also compatible with current 10.4 usage. >> >>-- Dave - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] echo -n now deprecated
On Dec 17, 2006, at 8:49 AM, David R.Morrison wrote: > As mentioned on the new "preparing for 10.5" page on the fink wiki, > echo -n is now deprecated in fink. I have edited the vast majority > of packages where this occurs to conform to the new version. > Instead of > >echo -n "string" > > one should now write > >/bin/echo "string\c" It is also okay to use printf - % printf "string" http://www.opengroup.org/onlinepubs/95399/utilities/printf.html Peter - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] echo -n now deprecated
I see coreutils is at version 6.7, vs 5.96 in fink. If the maintainer were willing to update, I would hope the need for the "/bin/" to disappear ... ; there should be a way to write things 'portably' (at least across current versions of GNU and of Darwin...). It is a bit of a shock to see coreutils behind darwin... JF Mertens On 17 Dec 2006, at 00:49, David R.Morrison wrote: > As mentioned on the new "preparing for 10.5" page on the fink wiki, > echo -n is now deprecated in fink. I have edited the vast majority > of packages where this occurs to conform to the new version. > Instead of > >echo -n "string" > > one should now write > >/bin/echo "string\c" > > (See "man echo".) This makes our use of echo POSIX compliant, and is > also compatible with current 10.4 usage. > >-- Dave - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel
[Fink-devel] echo -n now deprecated
As mentioned on the new "preparing for 10.5" page on the fink wiki, echo -n is now deprecated in fink. I have edited the vast majority of packages where this occurs to conform to the new version. Instead of echo -n "string" one should now write /bin/echo "string\c" (See "man echo".) This makes our use of echo POSIX compliant, and is also compatible with current 10.4 usage. -- Dave - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel