[Top][All Lists]

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

Re: eval

From: Jonathan Nieder
Subject: Re: eval
Date: Tue, 3 May 2011 21:41:28 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Rafael,

Rafael Fernandez wrote:

>         set -- a b c d e f g h i j k l m n o p q r s t u v w x y z
>         i=1
>         eval echo '$'$i         # outputs an expected 'a'
>         i=10
>         eval echo '$'$i         # outputs 'a0'; expected 'j'
>         i=11
>         eval echo '$'$i         # outputs 'b1'; expected 'k'

Have you tried

        eval "echo \${$i}"


reply via email to

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