redirecting the output of a command to a file

John W. Eaton jwe at bevo.che.wisc.edu
Fri Mar 7 09:39:58 CST 2008


On  7-Mar-2008, Kamaraju S Kusumanchi wrote:

| In Linux, the output of a command can redirected to a file doing
| 
| $command > file.txt

That's not Linux, that's the shell.

| Is there an equivalent of this in octave (for redirecting standard output
| and/or standard error)?
| 
| Consider the following situation where I run a script, then try out couple
| of calculations. At the end of it run another script. I would like to
| capture the output of this second script into a file. Is this possible?
| 
| octave 1> run_script1
| octave 2> perform other calculations
| octave 3> run_script2 > file.txt
| 
| I also tried putting all these things together (script1 + some commands +
| script2) into a bigger script. But the problem with this approach is that I
| do not want the output from script1 or from the middle part and am just
| interested in the output of script2.
| 
| Any ideas?

help diary

jwe


More information about the Help-octave mailing list