help-octave
[Top][All Lists]
Advanced

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

Re: piping octave output to a file with perls system() command


From: Muthiah Annamalai
Subject: Re: piping octave output to a file with perls system() command
Date: Sat, 30 Jun 2007 15:58:48 -0500



On 6/30/07, Brian Curtis <address@hidden> wrote:
I am having a problem piping the output from octave to a file only using
Perl scripts.  I use the command
system(`octave --help > /tmp/octave2.out`);
in a Perl script and nothing happens.  I've taken
'octave --help > /tmp/octave2.out'
and used it in the terminal and it works fine, and I've also tried using
a different program in the same directory using a Perl script, for
example:
system(`mysql --help > /tmp/octave2.out`);
works perfectly fine.  I am not sure if this is an octave problem or a
Perl problem, but I am hoping this is a good place to start for answers.

Thanks,
~Brian C.

 

you should run

$ strace program.pl

where your program.pl has a chmod +x and the first few lines invoke a
Perl interpreter.

/// example program.pl begins at next line
#!/usr/bin/perl

system('octave --help > savetotmp.dat')

#/// end of program.pl


Now there could be several problems, among which if you run strace you
should find if Octave starts up at all.

Clearly, I dont think this is an Octave problem.

Cheers,
Muthu


reply via email to

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