|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello,
is there way to start programs foo and bar such that foo's stdout goes to bar stdin and bar's stdout goes to stdin? Or to make program's stdin/out TCPIP socket? Ales |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
AlesD wrote:
> is there way to start programs foo and bar such that foo's stdout > goes to bar stdin and bar's stdout goes to stdin? I think with a little bit playing with mkfifo you can achieve this. Matěj -- GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC http://www.ceplovi.cz/matej/blog/, Jabber: ceplma@jabber.cz 23 Marion St. #3, (617) 876-1259, ICQ 132822213 In political activity men sail a boundless and bottomless sea; there is neither harbor for shelter nor floor for anchorage, neither starting point nor appointed destination. -- Michael Oakeshott: Rationalism in Politics |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
In article <ecd0pv$f0s$1@mrazik2.dkm.cz>, AlesD <ales_d@seznam.cz> wrote:
> is there way to start programs foo and bar such that foo's stdout >goes to bar stdin and bar's stdout goes to stdin? In ksh: foo |& bar <&p >&p John -- John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/ |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Mon, 21 Aug 2006 20:56:04 -0000, John DuBois wrote:
> In article <ecd0pv$f0s$1@mrazik2.dkm.cz>, AlesD <ales_d@seznam.cz> wrote: >> is there way to start programs foo and bar such that foo's stdout >>goes to bar stdin and bar's stdout goes to stdin? > > In ksh: > > foo |& > > bar <&p >&p [...] And in zsh: coproc foo bar <&p >&p |& in zsh is the same as in csh/tcsh: pipe both stdout and stderr in foo |& bar. Portable solution is to use named pipes: mkfifo other-way-round foo < other-way-round | bar > other-way-round Beware of deadlocks -- Stephane |
|
![]() |
| Outils de la discussion | |
|
|