← Back to team overview

sslug-teknik team mailing list archive

Re: Dagens tricky shell spørgsmål.

 

On Wed, 11 Sep 2002, Rasmus Andersen wrote:

> On Wed, Sep 11, 2002 at 07:38:20PM +0200, Mads Bondo Dydensborg wrote:
> > Præcist det jeg skriver. Man kan faktisk generalisere det til een process: 
> > "Hvordan forbinder man en process stdin til dens stdout fra en "normal" 
> > shell?"
> 
> Det hedder coprocesser. ksh og zsh kan det. Jeg har aldrig proevet.
> Klip fra zsh manpage:
> 
>        If a pipeline is preceded by `coproc', it is executed as a
>        coprocess; a two-way pipe is established  between  it  and
>        the parent shell.  The shell can read from or write to the
>        coprocess by means of  the  `>&p'  and  `<&p'  redirection
>        operators  or  with  `print -p' and `read -p'.  A pipeline
>        cannot be preceded by both `coproc' and `!'.  If job  con­
>        trol is active, the coprocess can be treated in other than
>        input and output as an ordinary background job.
> 
> Men jeg kan ikke lige faa det til at virke...

Hmm. Jeg er ikke sikker på at jeg kan læse det som at det løser mit 
problem.

jeg vil have opførsel som:

./mit_program > fifo < fifo

Er det det coproc giver mig?

Mads

-- 
Mads Bondo Dydensborg.                               madsdyd@xxxxxxxxxxxx
There was a time when religion ruled the world. It is known as The Dark Ages.
        - Ruth Hurmence Green (The Born Again Skeptic's Guide to the Bible)



Follow ups

References