[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: input variables form the shell
From: |
c. |
Subject: |
Re: input variables form the shell |
Date: |
Fri, 2 Mar 2012 18:00:16 +0100 |
On 2 Mar 2012, at 01:24, jacopo rocchi wrote:
> Hi thanks to everybody for the help. I haven't understood yet how to solve
> the problem and maybe I haven't been so clear.
>
> Suppose I have a scritp, oct.m, that needs an input variable to work. My
> question is
> 1) how to pass the variable from the shell;
> 2) how to read the variable in the script.
>
> For example in a normal bash script, scritp.sh, to pass two variables to the
> scripts, I would do:
> ./script 3.5 7
> and in the script I write
>
> variable1=$1
> variable2=$2
>
> In such a way variable1 takes the value 3.5 and variable2 takes the value 7.
>
> I've tried to use all the suggestions you gave me but I've haven's been able
> to resolve the problem, I always get an error message from octave.
> Ciao.
if you can send the examples you tried we might be able to help you fix them
ciao,
c.