[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to force delay in command execution in unamed pipe?
From: |
Peng Yu |
Subject: |
How to force delay in command execution in unamed pipe? |
Date: |
Sun, 3 Apr 2022 00:11:37 -0500 |
Hi
cmd <(cmd1) <(cmd2)
For a command like the above, I will need to let cmd2 run after cmd1
finishes. Of course, one could use temp files like the following. But
is there a way to follow such a constraint with unnamed pipes?
cmd1 > file1
cmd2 > file2
cmd file1 file2
Another way to avoid using unnamed pipes is to use a pipeline with
redirection like this. Is there a way to force cmd2 to run only after
cmd1 finishes in this pattern?
cmd1 | {
cmd2 | {
cmd "$fd1" "$fd2"
} {fd2}<&0
} {fd1}<&0
--
Regards,
Peng
- How to force delay in command execution in unamed pipe?,
Peng Yu <=