Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: printf %b
- X-seq: zsh-workers 23087
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: printf %b
- Date: Thu, 4 Jan 2007 16:32:00 +0000
- In-reply-to: <20070104153612.7aeb604f.pws@xxxxxxx>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20061227145818.GA4369@sc> <20070104153612.7aeb604f.pws@xxxxxxx>
- Sender: Stephane Chazelas <stephane_chazelas@xxxxxxxx>
On Thu, Jan 04, 2007 at 03:36:12PM +0000, Peter Stephenson wrote:
[...]
> - \0NNN works for "echo" (OK)
> - printf's arguments are like echo (OK, need \0NNN.
> However, Stephane... this means that
> printf '\123'
> *doesn't* print S any more, it needs '\0123', too; that's changed
> back with the fix below.)
> - print without options is the same as echo except for some additions
> (\C-..., \M-..., \E) (WRONG: \0NNN doesn't work but \NNN does)
> - \NNN works for bindkey sequences (and hence for "print -b")
> (OK).
>
> The same goes for \0xNN and \xNN.
[...]
Hi Peter,
POSIX says
printf '\123'
and
printf %b '\0123'
should output "S" (note that the two syntaxes are different!)
and
printf '\0123' should output <NL>3
printf %b '\123' should output \123 (I think).
Cheers,
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author