help-octave
[Top][All Lists]
Advanced

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

Re: call octave from shell script (with inputfile)


From: Ben Abbott
Subject: Re: call octave from shell script (with inputfile)
Date: Wed, 26 Mar 2008 13:16:52 -0400


On Mar 25, 2008, at 10:02 AM, Michael Bock wrote:


---  sorry for cross posting (it's my first one...)  ---

Hello everybody,

I'm quite new to Octave and the list and I have a problem calling octave from a shell script. I have a octave script which is running properly when run from octave's prompt. I also can call an octave "Hello world" script from a shell script. However I cannot call a octave script and giving it an
inputfile from the shell. I tried several quotings like this one:

in a shell:

% octave -qf octavescript.m('inputfile.dat')

in the example inputfile.dat is a textfile with the data I want to process.
I also tried with double quotes " and without quotes...

the error is:
bash: syntax error near unexpected token `('

I'm doing this on ubuntu 7.10 with octave 2.9.12

Any useful hints are very much appreciated!!

Michael
--

Try

        octave --silent --eval 'octavescript("inputfile.dat")'

The form you tried is for scripts, not for functions.

Ben

Ben




reply via email to

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