Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8004801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:01:20+00:00 2026-06-04T17:01:20+00:00

Well I learning Shell Script this one thing is annoying me I cant find

  • 0

Well I learning Shell Script this one thing is annoying me
I cant find what actually ${ } suppose to do

I google around to found out that ${ } is used for substitution

but what I not able to understand is here

If ${ } is suppose to do a substitution then

distro=("redhat" "debian" "gentoo")

echo ${distro[0]}
echo ${distro[2]}

echo ${#distro[@]} 

How come it running the above code when there isnt any substitution .

I’m wrong on this

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T17:01:21+00:00Added an answer on June 4, 2026 at 5:01 pm

    man bash, search for ${ with /\${, press n a couple of time and voila..

    Any element of an array may be referenced using ${name[subscript]}.

    and

    ${#name[subscript]} expands to the length of ${name[subscript]}. If
    subscript is * or @, the expansion is the number of elements in the
    array.

    Checking the previous paragraphs you will also find this:

    Arrays are assigned to using compound assignments of the form name=(value1
    … valuen), where each value is of the form [subscript]=string. Indexed
    array assignments do not require the bracket and subscript.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well, I'm learning Scala so this question may be too basic for most people.
Well..I am learning java now and I am curious to know will this yield
Well, i'm learning to work with QML and i have one doubt. In my
I am learning Python and am making a Q&A script. I made one function
To begin I'm sorry for my english :) Well, i'm actually learning Rails with
$(#write).click(function(){ $(#msg).$('#quote').html(); }); I am learning jquery (new to js as well). This function
well im learning to create a wordpress plugin i downloaded one and read the
I'm learning C. I find I learn programming well when I try things and
I'm currently learning some Javascript, and I'd made a realtime clock (well actually I
I'm learning Corona SDK and am new to lua as well (i mainly do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.