help-octave
[Top][All Lists]
Advanced

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

Re: How to run Octave scripts with MacOS


From: Ben Abbott
Subject: Re: How to run Octave scripts with MacOS
Date: Wed, 05 May 2010 19:18:20 -0400

On May 5, 2010, at 3:38 PM, Richard J Wittebort wrote:

> Hi,
> I have downloaded and installed octave for an intel mac (OS 10.5.8). The 
> application now resides in a directory called 'octave_all' located in the 
> applications directory and command line instructions execute as expected. 
> However, I am unable to execute, for example, the following script (test.m) 
> from the command line if the file is located in my 'octave_all' directory:
> 
> #! applications/octave_all/octave.app/Contents/Resources/bin/octave -qf
> 
> a=[1,2,3]
> a
> # end of script 
> 
> Could you please tell me how to run a script. For example, which, if any, of 
> the following is required and how to do it:
> 
> 1. add a path in the command line?
> 2. transfer the script to a directory in the octave.app directory?
> 3. use a header different from the 1st line in the above (#! 
> applications/octave_all/octave.app/Contents/Resources/bin/octave -qf)
> 
> I much appreciate your help,


Try ...

#!/usr/bin/env 
/Applications/octave_all/Octave.app/Contents/Resources/bin/octave -qf
a=[1,2,3]
a
# end of script 

Ben



reply via email to

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