help-octave
[Top][All Lists]
Advanced

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

stdout to file opened with fopen


From: samuel . hartmann
Subject: stdout to file opened with fopen
Date: Tue, 12 Aug 2003 15:19:54 +0200

Hello,

I want the stdout to be written to a file I opened before with fopen. But
it does not work on Octave 2.1.42 under Cygwin.

I tried it as follows:

fid=fopen("outputfile","w");
[newfid,msg]=dup2(fid, stdout);

the dup2 function returns -1 as newfid, msg is empty.

As I remember this worked with Octave 2.0.16 on Linux.
Can anybody help me?

Perhaps someone knows another way for what I want to do: I want to call a
command, which writes the output to a file opened before with fopen.


Thanks,

Samuel



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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