help-octave
[Top][All Lists]
Advanced

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

Re: input variables form the shell


From: Jordi Gutiérrez Hermoso
Subject: Re: input variables form the shell
Date: Thu, 1 Mar 2012 11:48:20 -0500

2012/3/1 Jordi Gutiérrez Hermoso <address@hidden>:
> On 1 March 2012 10:57, jacopo rocchi <address@hidden> wrote:
>> I would liko to do something like this:
>>
>> write this in the shell: >octave -q script.m ARG
>> And then inside script.m i would write something like this: disp(2*ARG);
>>
>> So I would like the script to print to the shell 2 times the argument passed
>> in input.
>
> Yes, see the bottom here:
>
>    
> http://www.gnu.org/software/octave/doc/interpreter/Command-Line-Options.html
>

Oh and one more thing: you can also turn script.m into this:

    #!/usr/bin/octave -q
    ...
    # other stuff

set its executable bit, then do ./script.m ARG.

- Jordi G. H.


reply via email to

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