Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Location
    Chennai
    Posts
    11

    Question Unanswered: Dynamic variables

    I am reposting ..
    months1="Jan"

    i=1
    a=`echo months$i`
    a=`eval $a`
    echo $a

    I want to get the value "Jan". How can i do this?


    -- Navanee

  2. #2
    Join Date
    Dec 2002
    Posts
    104

    Re: Dynamic variables

    Originally posted by rnavanee
    I am reposting ..
    months1="Jan"

    i=1
    a=`echo months$i`
    a=`eval $a`
    echo $a

    I want to get the value "Jan". How can i do this?


    -- Navanee
    months1='jan'
    i=1
    eval eval echo \\$\months$i

    hope this will help,
    Pooja

  3. #3
    Join Date
    Jul 2003
    Location
    Chennai
    Posts
    11

    Talking

    Pooja,
    Thank you this is working fine!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •