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/000095399/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