help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invoke an octave session via pipe


From: John W. Eaton
Subject: Re: Invoke an octave session via pipe
Date: Thu, 7 May 2009 16:17:32 -0400

On  7-May-2009, Qianqian Fang wrote:

| What makes me curious is why my stdout reading did not give me the
| octave prompt, i.e. "octave:1>"? looks like once octave get started,
| it will start something else, which I can not access its stdout via
| octave's stdout.

No, I think Octave writes the prompt and most output to stdout.
Probably you want to use the --interactive option when talking to
Octave over a pipe.  If you are on a Unixy system, try this
experiment:

  in one terminal window, run

    mkdir fifo
    octave --interactive < fifo > foo.out

  and in another, type

    cat > fifo
    svd (rand (3))
    fprintf (stderr, "stderr!\n")

and then look at foo.out.  It should contain all of Octave's output
except the "stderr!" message, which should have been printed to the
terminal where you started Octave.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]