Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: printf bug(s?)
- X-seq: zsh-workers 21356
- From: J <jean.chalard@xxxxxxxxx>
- To: Harald van Dijk <truedfx@xxxxxxxxxx>
- Subject: Re: printf bug(s?)
- Date: Fri, 17 Jun 2005 15:48:30 +0200
- Cc: zsh-workers@xxxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dvLOPkUC386nOCYyKfDWgNihc5V/m9pQ1UUU68Z9mZ60b/NMpVOoI/+OazUlDf1aPAKDBQ85GFfmmZDTd1aiz1hIXeVupX6Y47h7P8XvIf5slP4qKiPqq2+74J1750Iy7380Sn2uLBe8jvghRCiuJ416fxhhHER1h+oVTGHeOg8=
- In-reply-to: <42B2CE98.8070905@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <42B2203B.3060602@xxxxxxxxxx> <8037.1118996107@xxxxxxxxxxxxxxxxxxxxxxx> <42B2CE98.8070905@xxxxxxxxxx>
- Reply-to: J <jean.chalard@xxxxxxxxx>
> Oh, there are other printfs that behave the same? That I didn't know; in
> that case, I may be better off avoiding using \045 anyway and just
> replace it with %%...
My understanding is that for all intents and purposes, printf should
consider a character designed by his octal code as the character
itself, be it a control character or not, pretty much the same way
that the shell interprets it before handing it to the command when
it's enclosed in $'...'. If I run
$ printf '\045i' '5+1'
I would certainly expect it to print 6, and not %i.
Of course that's just what I would expect as a user. Other people may disagree.
--
J
Messages sorted by:
Reverse Date,
Date,
Thread,
Author