On Thursday 11 November 2010 13:58:00 Mariano Cediel wrote:
> x1="UNO"
> x2="DOS"
> 
> for variable in $(seq 1 2); do
>    echo $(x$variable)
> done
>
> Esto no funciona, obviamente.
> (de ahí mi pregunta)
> 
> Pero la salida tiene que ser
> UNO
> DOS

x[1]="UNO"
x[2]="DOS"

for variable in $(seq 1 2); do
        echo ${x[$variable]}
done
 
> Saludos y gracias
> --
> 
>         [o - -  -   -    -      -
>    (\   |                  u d t
>    (  \_('>              c c s
>    (__(=_)             s o ?
>       -"=

-- 

Marc Olivé
Grup Blau

www.grupblau.com  


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Responder a