Jonathan Nieder dixit:

>This construct is also handy when one wants to update the current
>environment downstream from some other process.

        process |&
        while IFS= read -pr line; do
                …
        done

↑ is the proper ksh idiom for that.


>      <( ... )    - runs ... in a subshell in the background, with its
>                    output connected to a pipe.

Ah, interesting. I would have thought it ran the stuff first,
wrote it to a temporary file and then passed that to the
other process, sort of like a dynamic here document, from
when I first read about it. (Didn’t know >(…) existed.)

>On Linux and similar OSes this is typically implemented using
>/proc/fd.  A more portable implementation would use FIFOs.

I don’t know whether this works on all mksh target OSes, but
that can surely be investigated.

>What do you think?  Is it worth implementing in mksh?

<(…) is already on the wishlist – if you want to submit a
patch, you’re welcome ;-) it should work on DEC ULTRIX 4.5,
DEC OSF/1 V2.0, Minix 3, Haiku, Cygwin, UWIN, etc. though,
and, if possible, Plan 9. ☺

A side note, I’d like to track upstream feature requests
*not* inside the Debian BTS. We usually use the MirBSD
mailing list for that, although there’s now a Launchpad
project associated with mksh which can be used if desired.

bye,
//mirabilos
-- 
<ch> you introduced a merge commit        │<mika> % g rebase -i HEAD^^
<mika> sorry, no idea and rebasing just fscked │<mika> Segmentation
<ch> should have cloned into a clean repo      │  fault (core dumped)
<ch> if I rebase that now, it's really ugh     │<mika:#grml> wuahhhhhh



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to