piping

piping

Post by Massimo Fubi » Thu, 10 Apr 1997 04:00:00



I am searching for an easy way to do the following thing:
process1.stdoutput->process2.stdinput
process2.stdoutput->process1.stdinput
simultaneously

I mean:  ---> p1 | p2 | >---
         |                 |            
         ----<---------<----

Thanks in advance.

 
 
 

piping

Post by Icarus Spar » Thu, 10 Apr 1997 04:00:00




>I am searching for an easy way to do the following thing:
>process1.stdoutput->process2.stdinput
>process2.stdoutput->process1.stdinput
>simultaneously

>I mean:  ---> p1 | p2 | >---
>         |                 |            
>         ----<---------<----

In the jargon, p1 and p2 are 'co-processes'. If you have ksh then you can
write

p1 |&
p2 <&p >&p

to do this. I can't off hand think of a way of doing this with sh, but if you
are willing to write some C or PERL code then it is not too hard.

Icarus

 
 
 

piping

Post by Mr Simon L » Sat, 12 Apr 1997 04:00:00


: I am searching for an easy way to do the following thing:
: process1.stdoutput->process2.stdinput
: process2.stdoutput->process1.stdinput
: simultaneously

fifo could help

The p1 should read from the fifo and p2 the stdout to it:

mknod name p
p1 < &
p1 | p2 | tee > name &

Simon

: I mean:  ---> p1 | p2 | >---
:          |                 |            
:          ----<---------<----

: Thanks in advance.

 
 
 

1. dump pipe gzip pipe ssh pipe dd... blocksize?

Here's the command I'm planning to use for dumping across a network:

dump -0u -B 8000000 -f - /dev/sd0a | gzip | ssh host 'dd obs=32k of=/dev/nrst0'

Notice I define a blocksize on the dd command, but I haven't defined one
anywhere else. This was after a write failuer with no block size set on a
big backup. Someone suggested setting the block size miught help. I'm not
too sure what the ramifications of this are. Is it a Bad Thing to mix the
block size? I don't believe gzip gives you an option for setting block
size. Should I worry? A couple of test backups and retores seemed to work
okay.

Thanks,
jon

2. how to have multiple lex/yacc files in source code

3. Controlling ftp via a pipe: using pty's on a pipe

4. Solaris X86 Install and ATI Ultra Pro

5. tee like pipe-fitter that forks to another pipe?

6. A Device Driver for Pentium Performance Counters

7. DOUBLE PIPE FAILS BUT SEPERATE PIPES WORK - HELP ME UNDERSTAND WHY

8. kernel: MASQ: failed TCP/UDP checksum from x.x.x.x!

9. Two-Way Pipe or Circular Pipe

10. Any compatibility between Unix Named Pipes and NT Named Pipes??

11. Full-duplex pipes (STREAMS pipes)

12. C pipe (simulate Unix pipe command)

13. problem opening multiple pipes with pipe(2) in 2.4.1[78]