Nested Variable Substitution and Predefined BASH Variables in Linux – Part 11

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

3 Responses

  1. buge says:

    echo ${!y}

  2. Igor says:

    You don’t need to use eval to assign value of x to y.
    You will get the same output using

    • Avishek Kumar says:

      Thanks for your feedback.

      But Let me know – What in case of multiple variable substitution, where we are dealing with lots of variable and 100’s of lines of code???
      ‘eval’ command comes to rescue there.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 300K+ Linux Users
  1. 177,942
  2. 8,310
  3. 37,548

Are you subscribed?