anonymous-pipes

Bash Anonymous Pipes

六月ゝ 毕业季﹏ 提交于 2019-12-05 17:29:17
问题 When designing a chain of commands to perform a certain task, i ran into the problem that anonymous pipes do not behave like expected. As the original command that i am running is too complex to explain here, i've created an example that shows the problem (i know that all these commands are doing basically nothing). Also, i am using pv to show whether the data is actually copied from input to output. cat /dev/zero | pv > /dev/null This works as expected. (copy data from /dev/zero to /dev/null

Bash Anonymous Pipes

笑着哭i 提交于 2019-12-04 03:00:44
When designing a chain of commands to perform a certain task, i ran into the problem that anonymous pipes do not behave like expected. As the original command that i am running is too complex to explain here, i've created an example that shows the problem (i know that all these commands are doing basically nothing). Also, i am using pv to show whether the data is actually copied from input to output. cat /dev/zero | pv > /dev/null This works as expected. (copy data from /dev/zero to /dev/null) cat /dev/zero | tee /dev/null | pv > /dev/null This also works as expected (duplicate the data and