Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

/usr/bin/printf



zsh (zsh 4.3.4 (i686-pc-linux-gnu)) seems to use (probably for
optimization) its built-in printf even if you explicitly specify
/usr/bin/printf .  Of course, this is only coming up because zsh's
printf seems to be wrong (or it least doesn't match the executable it's
mimicking)

Under bash:

$ printf "%s\n" foo
foo

Under dash (or bash):

$ /usr/bin/printf "%s\n" foo
foo

Under zsh:

% printf "%s\n" foo

" foofoo

/usr/bin/printf "%s\n" foo

" foofoo

zsh's printf does some really bizarre things:

% /usr/bin/printf "%s" > /dev/null
" > /dev/null

It actually prints the text /dev/null !

Under bash:

$ /usr/bin/printf "%s" > /dev/null
$

Is this a known issue?

Matt Flaschen



Messages sorted by: Reverse Date, Date, Thread, Author