Practice: Indexed Arrays

Put to practice what you have learned about indexed arrays.

We'll cover the following

Declaration of arrays

Try all the following variants of the array declarations:

  1. Declare the array with the contents of the Practice folder using the declare command.
  2. Declare the array with the contents of the Practice folder without the declare command.
  3. Specify the elements in the array declaration.
  4. Declare a few variables and assign them file names.
  5. Assign the values of these existing variables to array elements.
  6. Read the array elements from a text file named names.txt.
  7. Remove any element from the array.
  8. Print the array contents using the echo command for each case.

Connect the terminal below to run the commands.

Get hands-on with 1200+ tech skills courses.