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

Re: Capturing STDOUT without subshells or file I/O



On Mon, Sep 03, 2018 at 02:02:14PM +0000, Daniel Shahaf wrote:
> Just pass -v to the builtin printf, e.g.,
> 
> % printf -v foo 'a%03d' 42
> % typeset -p foo
> a042
> % 

Much nicer, wow. Looks like I'll be revising quite a few of my scripts
today.

-- 
Cheers,
Joey Pabalinas

Attachment: signature.asc
Description: PGP signature



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