Skip to content

Process substitution, the other way around #1786

Description

@lloeki

diff (sort a.txt|psub) (sort b.txt|psub) is the most well known example of process substitution, but it's supposed to work the other way around too.

Bash:

$ xxd -l 20 -p /dev/random | tee >(cat 1>&2) | tr '[:lower:]' '[:upper:]'
2f441071086cabff98063780d1cc168803aadeb2
2F441071086CABFF98063780D1CC168803AADEB2

Fish:

> xxd -l 20 -p /dev/random | tee (psub | cat 1>&2) | tr '[:lower:]' '[:upper:]'
/tmp/.psub.cKChjevJJ7
A36ACA436120802CAF07AD859880BD8F03E76A5B

Ouch.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions