Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用 Linux 管道创建循环?例如
cmd1 | 命令2 | cmd3 | '返回标准输入 cmd1'
换句话说,我想stdout连接cmd3回stdinof cmd1。
stdout
cmd3
stdin
cmd1
您可以使用命名管道/FIFO:
mkfifo cmd3-to-cmd1 cmd1 < cmd3-to-cmd1 | cmd2 | cmd3 >> cmd3-to-cmd1