[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Passing options to a batch scripts
From: |
Doug Sturim |
Subject: |
RE: Passing options to a batch scripts |
Date: |
Thu, 2 Mar 2000 11:49:19 -0500 |
That's it. It is also in the 2.1.28 documentation, which I guess has
changed since last I looked at it about a month ago. So RTFM holds true.
Thanks Tristan!
------------------------------------------------------------
Douglas Sturim Information Systems Technology Group
address@hidden MIT Lincoln Laboratory
(781) 981-4462 Lexington, MA 02420-9185
-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf Of Tristan Quaife
Sent: Thursday, March 02, 2000 11:18 AM
To: Help-Octave
Subject: Re: Passing options to a batch scripts
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
-----------------------------------------------------------------------
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------