Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 'loop-device' is not related to a 'for loop'. Please consider removing the 'loop-device' tag. Commented Mar 26, 2014 at 22:42
  • Do `echo "${ARRAY[$1]}" work? Commented Mar 26, 2014 at 22:43
  • Could you please clarify? You are using $i as an iterator. When does it not work? Commented Mar 26, 2014 at 22:52
  • ${ARRAY[$1]} not working for me. clarify? When i'm using $i in ${ARRAY[$i]} echo prints blank line. When i'm using number (0, 1, 2, 3...) ${ARRAY[3]} it's working. Commented Mar 26, 2014 at 22:53
  • Please edit your question, how is $1 relevant? Show the code that does not work and explain what you expected to get and what you actually get. Commented Mar 26, 2014 at 22:55