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

Re: printf bug(s?)



> 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