/dev/null mystery
by igadoter from LinuxQuestions.org on (#5KV2R)
This
Code:$ grep "5" <(ping www.google.com) > fooand this
Code:$ grep "5" <(ping www.google.com) > /dev/nullbehaves completely different. The first there are matches but no matter file foo is all time empty. Second: the first command never stops while the second one stops after the first match (supposedly).
Piping works as expected
Code:$ ping www.google.com | grep "5" > /dev/nullit is never stopping process.
Code:$ grep "5" <(ping www.google.com) > fooand this
Code:$ grep "5" <(ping www.google.com) > /dev/nullbehaves completely different. The first there are matches but no matter file foo is all time empty. Second: the first command never stops while the second one stops after the first match (supposedly).
Piping works as expected
Code:$ ping www.google.com | grep "5" > /dev/nullit is never stopping process.