[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: piping octave output to a file with perls system() command
From: |
John W. Eaton |
Subject: |
Re: piping octave output to a file with perls system() command |
Date: |
Sat, 30 Jun 2007 17:31:15 -0400 |
On 30-Jun-2007, Muthiah Annamalai wrote:
| 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`);
Don't backquotes in Perl do the same thing as in the shell (i.e., run
the quoted command and then replace the backquoted thing in the script
with the output from the command)? Since
`octave --help > /tmp/octave2.out`
doesn't produce any output, it is equivalent to running
system ('')
except with the side effect of writing the Octave help text to the
file /tmp/octave2.out.
Maybe you meant to use single or double quotes instead:
system ('octave --help > /tmp/octave2.out');
system ("octave --help > /tmp/octave2.out");
?
jwe