shell-script-pt
[Top][All Lists]
Advanced

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

Re: [shell-script] como indexar nome de variavel?


From: Felipe Kellermann
Subject: Re: [shell-script] como indexar nome de variavel?
Date: Fri, 26 May 2006 21:53:20 -0300 (BRT)
User-agent: Pine <http://www.washington.edu/pine/>

On Fri, 26 May 2006 6:31pm  -0300, Tiago Barcellos Peczenyj wrote:

> ->for i in 1 2 3
> do eval "teste_$i=$i"
> echo $teste_$i
> done
> 
> 1
> 2
> 3

Oops. Engano. Parece estar correto mas nao esta. Precisa ser eval echo 
\$teste_$i. Esta mostrando sempre o valor de $fuu_ e de $i. Juntos formam 
novamente o 1, 2 e 3. 

-- 
Felipe Kellermann


reply via email to

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