help-octave
[Top][All Lists]
Advanced

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

Re: octave and shell commands


From: Paul Kienzle
Subject: Re: octave and shell commands
Date: Wed, 20 Apr 2005 19:37:06 -0400

Here's a hack:

  function s(varargin),
        b=varargin;
        b{2,:}='" "';
        system(['"',b{:},'"']);
  end
  octave> mark_as_command s
  octave> s sh -c "echo hello"
  hello

It will work better with new octave and mark_as_command.

- Paul

On Apr 20, 2005, at 3:26 PM, Quentin Spencer wrote:

address@hidden wrote:

can I use shell commands in octave like e.g. in gnuplot by the "!"?

I don't think "!" is supported, but you can use the "system" command: system("ls");

-Quentin



-------------------------------------------------------------
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
-------------------------------------------------------------




-------------------------------------------------------------
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]