Thorsten Glaser wrote:

> apparently (from a #grml discussion in IRC), zsh has two:
>
> <(…) uses /dev/fd (or pipes, I guess)
> =(…) uses temporary files (to aid applications to lseek on it)
>
> Maybe we should just take on the latter (reuse the heredoc
> infrastructure) and make it available as <(…) (since nobody
> even knows about =(…) and so it's pointless)?

A common use of <(...) is to parse output from a command and let it
influence the current environment:

        while read key value
        do
                if test "$key" = thegoodone
                then
                        val=$value
                        break
                fi
        done < <(producer)

The "producer" command here could produce a potentially infinite
stream of output.

The application that led me to mention process substitution to you
also involved concurrent processes.

        producer |
        tee >(xz >log.xz) |
        consumer

Hope that helps,
Jonathan



--
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