-->

POSIX shell equivalent to <()

2020-04-03 04:36发布

问题:

<(commands ...) in bash/zsh makes the output behavior as a file. Does a POSIX equivalent exist?

回答1:

mkfifo foo.fifo

## if your "commands" is multiple commands
# { commands ...; } >foo.fifo &

# otherwise, if it's just one
commands ... >foo.fifo &

something_else foo.fifo

is the closest available equivalent to

something_else <( commands ... )