KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How can I make this code work? #!/bin/bash ARRAYNAME='FRUITS' FRUITS=( APPLE BANANA ORANGE ) for FRUIT in ${!ARRAYNAME[@]} do echo ${FRUIT} done This code: echo ${!ARRAYNAME[0]} Prints APPLE . I'm tryng to do something similar but with "[@]" to iterate over the array. Thanks in advance,
Tags (comma-separated)
Save Edits
Cancel