Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16481

Re: Undocumented feature: Unnamed fifo '<(:)'

From Eli Schwartz <eschwartz@archlinux.org>
Newsgroups gnu.bash.bug
Subject Re: Undocumented feature: Unnamed fifo '<(:)'
Date 2020-06-29 08:06 -0400
Message-ID <mailman.636.1593432397.2574.bug-bash@gnu.org> (permalink)
References (2 earlier) <20200628134945.GB24863@medium.hauri> <CANaoh6KSJS8X73Zqj7M8TT6_gAOjGraZx1EaEVwUNN_=Yya3wQ@mail.gmail.com> <6427.1593375682@jinx.noi.kre.to> <19917.1593425185@jinx.noi.kre.to> <d5cf5f49-7a3b-7b93-2c14-729719a0b87a@archlinux.org>

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 6/29/20 6:06 AM, Robert Elz wrote:
> Perhaps, but that would be a bizarre way to accomplish that.   I got
> the impression that the assumption was that there would somehow be just
> one fork, no matter how many times the conversion was required.   I
> think that might be possible using bash - but not using date(1) to do
> the conversions, it would need a purpose written command which read date
> specs from stdin and wrote time_t's (in decimal) to stdout.

If we are going with purpose-written commands I'd advise the OP to write
a bash loadable builtin for date. There is already a strftime one, but
it only lets you convert an epoch to an arbitrary format.

And once we are in bash loadable builtins land, one can also add an
option to save the output into a bash variable (like printf -v) instead
of printing it to stdout. There are a couple of example loadable
builtins that do this sort of thing already.

No forks involved, not even one for the lifetime of the script.

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Undocumented feature: Unnamed fifo '<(:)' Eli Schwartz <eschwartz@archlinux.org> - 2020-06-29 08:06 -0400

csiph-web