Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
printf "%i\n" 7 outputs extra newline
- X-seq: zsh-users 12980
- From: Omari Norman <omari@xxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: printf "%i\n" 7 outputs extra newline
- Date: Wed, 18 Jun 2008 20:21:38 -0400
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Greetings,
When I run
printf '%i' 7
I get a 7, but with a newline both before and after it. I get the same
thing if I use /usr/bin/printf (by first running disable printf.)
However, if I use any other combination of shell and printf I get just a
7 with a newline after it, and no newline before it. I've tried ksh with
builtin and /usr/bin/printf; bash with both printf commands, and fish
with /usr/bin/printf (fish has no builtin printf.)
Is anyone getting the same result? Is there a good explanation for this?
Especially strange to me is how /usr/bin/printf seems to behave
differently in zsh than in other shells. Thanks.
Omari
Messages sorted by:
Reverse Date,
Date,
Thread,
Author