help-octave
[Top][All Lists]
Advanced

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

Re: Passing options to a batch scripts


From: Tristan Quaife
Subject: Re: Passing options to a batch scripts
Date: Thu, 02 Mar 2000 16:18:23 +0000

Doug, 

The variable argv contains the command line arguments for a script.
For example, the script:



#!/usr/contrib/bin/octave -q
#NB - you will need to put the path to _your_ 
#octave binary on this first line! 

for i=1:nargin
  printf("%s\n",argv( i ));
endfor



Will print out any arguments entered on the command line after
the name of the script.

Hope this helps,

Tristan.


Doug Sturim wrote:
> 
> I am running octave in batch but I would also like to pass arguments to my
> scripts from the Unix command line. Does anyone have any ideas on how to do
> this? Currently I generate dummy script and call thoughts.
> 
> Thanks,
> 
> Doug
> 
> ------------------------------------------------------------
> Douglas Sturim          Information Systems Technology Group
> address@hidden       MIT Lincoln Laboratory
> (781) 981-4462          Lexington, MA 02420-9185
> 
> -----------------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
> 
> Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
> How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
> Subscription information:  http://www.che.wisc.edu/octave/archive.html
> -----------------------------------------------------------------------



-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------



reply via email to

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