小编dr_*_*dom的帖子

在bash中使用两个命令读取相同的stdin

我想将 bash 中的两个单独命令 <2,3> 的输出通过管道传输。这样做的最佳方法是什么?目前,我有以下脚本:

command source > output
command2 output &
command3 output &
Run Code Online (Sandbox Code Playgroud)

输出文件大约为 100G,一种次优的方式是分别通过管道传输到命令 2 和 3。我认为有可能做得更有效。

bash pipe

6
推荐指数
1
解决办法
5390
查看次数

标签 统计

bash ×1

pipe ×1