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:
- Declare the array with the contents of the
Practice
folder using thedeclare
command. - Declare the array with the contents of the Practice folder without the
declare
command. - Specify the elements in the array declaration.
- Declare a few variables and assign them file names.
- Assign the values of these existing variables to array elements.
- Read the array elements from a text file named
names.txt
. - Remove any element from the array.
- Print the array contents using the
echo
command for each case.
Connect the terminal below to run the commands.
Get hands-on with 1400+ tech skills courses.