[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave advocacy
From: |
David Bateman |
Subject: |
Re: Octave advocacy |
Date: |
Mon, 20 Sep 2004 09:52:51 +0200 |
User-agent: |
Mutt/1.4.1i |
According to Mike Miller <address@hidden> (on 09/17/04):
> On Fri, 17 Sep 2004, David Bateman wrote:
>
> >Why not include the line
> >
> >#! /usr/local/bin/octave -q
> >
> >as the first line of your script and then the script itself is
> >execeutable
>
>
> I'm not sure that I understand your point. The script I wrote (below)
> will run arbitrary octave commands straight from the command line. If the
> script began with the line you suggest, would it run arbitrary code
> entered on the command line, or would it only run whatever code I typed on
> subsequent lines within the script?
No, it makes a dot-m file itself executable. Frankly, its rare that
you'll want to type something just once on the commandline as you'll
almsot inevitably make a mistake, or want to alter something.
> Maybe your approach will be better than mine, but we need a way to write
> your script such that it will read arguments from the command line and
> execute them as octave commands. Maybe something like 'eval' could be
> used, but I'm not sure it would be better than what I have.
What about something like
if (length(argv))
for i=1:length(argv)
eval(nth(argv,i));
endfor
endif
D.
--
David Bateman address@hidden
Motorola CRM +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
-------------------------------------------------------------
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
-------------------------------------------------------------
Re: Octave advocacy, Quentin Spencer, 2004/09/17
- Re: Octave advocacy, NZG, 2004/09/17
- Re: Octave advocacy, Jonathan C. Webster, 2004/09/17
- Re: Octave distribution (was: Re: Octave advocacy), Dirk Eddelbuettel, 2004/09/17
- Re: Octave distribution (was: Re: Octave advocacy), Paul Kienzle, 2004/09/17
- Re: Octave distribution, Jonathan Stickel, 2004/09/18