bash - POSIX shell 等效于 <()

标签 bash posix sh zsh process-substitution

<(commands ...)在 bash/zsh 中将输出行为作为文件。 是否存在 POSIX 等价物?

最佳答案

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

是最接近的等价物

something_else <( commands ... )

关于bash - POSIX shell 等效于 <(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38796224/

相关文章:

bash - 为什么 AWK 在 makefile 中不能正常工作?

bash - 在屏幕命令中重定向标准输出

c - 为什么我的 setuid 功能不起作用?

linux - 通过shell脚本添加用户到sudoers

linux - 如何删除文件中的重复出现?

linux - 当我通过终端运行 shell 脚本时,它工作正常,当我在 jenkins 中运行时,它给出了错误

c++ - 如何从 C++ 获取可执行共享库列表?

c - stat 的 st_blksize 是以位还是字节为单位测量的?

bash - 从 Linux 终端获取网页标题、图像、元数据信息

bash - 在 shell for 循环中移动文件时出错