From: Joey Pabalinas <joeypabalinas@gmail.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: Ben Klein <robobenklein@gmail.com>,
zsh-users@zsh.org, Joey Pabalinas <joeypabalinas@gmail.com>
Subject: Re: Capturing STDOUT without subshells or file I/O
Date: Mon, 3 Sep 2018 08:43:53 -1000 [thread overview]
Message-ID: <20180903184353.yzujt7ywnlvufeye@gmail.com> (raw)
In-Reply-To: <20180903140214.76kbzgpfru6atc5u@tarpaulin.shahaf.local2>
[-- Attachment #1: Type: text/plain, Size: 291 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-09-03 18:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-02 20:57 Ben Klein
2018-09-03 0:40 ` Joey Pabalinas
2018-09-03 14:02 ` Daniel Shahaf
2018-09-03 18:43 ` Joey Pabalinas [this message]
2018-09-17 20:13 ` Ben Klein
2018-09-17 20:46 ` Daniel Shahaf
2018-09-17 21:01 ` Mikael Magnusson
2018-09-17 21:20 ` Bart Schaefer
2018-09-17 21:19 ` dana
2018-09-17 21:33 ` Bart Schaefer
2018-09-18 5:12 ` Sebastian Gniazdowski
2018-09-21 6:58 ` Oliver Kiddle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180903184353.yzujt7ywnlvufeye@gmail.com \
--to=joeypabalinas@gmail.com \
--cc=d.s@daniel.shahaf.name \
--cc=robobenklein@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).