Indexed array declaration
📖 Scenario: You are organizing a list of your favorite fruits to use in a script that will later process them.
🎯 Goal: Create an indexed array in Bash with specific fruit names, then display the array contents.
📋 What You'll Learn
Create an indexed array named
fruits with exact valuesAdd a variable to hold the number of fruits
Use a loop to print each fruit with its index
Print the total number of fruits at the end
💡 Why This Matters
🌍 Real World
Arrays help organize lists of items like filenames, user inputs, or settings in scripts.
💼 Career
Knowing how to use arrays in Bash is essential for automating tasks and managing data in system administration and DevOps roles.
Progress0 / 4 steps