Bram Moolenaar wrote: [...] > "echo" is a builtin, "printf" is a program. I think this means it will > be a bit slower, right? Not sure if this matters. > > Also, since printf is a program, isn't there a risk that with some > weird arguments something strange may go wrong? > > Why do you put "env" before "printf"? > >
On my system, both echo and printf exist as both a bash builtin and an external executable. "My" echo (GNU) accepts additional options to -n (only option mentioned in the opengroup article, and not on all systems): -e (interpret backslash-escapes) and -E (backslash is a normal display character). env causes the following command on the same line to be searched in the $PATH, disregarding any shell builtins, as can be seen from the following: $ env printf --version printf (GNU coreutils) 6.9 Copyright (C) 2007 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law. $ printf --version bash: printf: --: invalid option printf: usage: printf [-v var] format [arguments] Best regards, Tony. -- When love is gone, there's always justice. And when justice is gone, there's always force. And when force is gone, there's always Mom. Hi, Mom! -- Laurie Anderson --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
