code_junkie

Setting up pipelines reading from named pipes without blocking in bash

Nov 11th, 2011
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. $ mkfifo /tmp/foobar.pipe
  2. $ some_program --command-fd=5 5</tmp/foobar.pipe
  3.  
  4. $ mkfifo /tmp/foobar.pipe
  5. $ some_program --command-fd=5 5<>/tmp/foobar.pipe
  6.  
  7. mkfifo /tmp/foobar.in
  8. mkfifo /tmp/foobar.out
  9. ( cat </tmp/foobar.in ) >/tmp/foobar.out &
  10. some_program --command-fd=5 5</tmp/foobar.out
Add Comment
Please, Sign In to add comment