An array is a variable that is used to store a set of values (strings or numbers). These values, or independent elements, are accessed by their index in the array. Indexes are stored in square brackets and may be either numbers or strings. This chapter focuses on how arrays are implemented in AWK.
In this chapter, we will cover the following topics:
- One-dimensional arrays in AWK
- Assigning and accessing elements in arrays
- Referring to array elements
- Processing arrays using loops
- Creating an array using a split function
- Delete operations in arrays
- Multidimensional array implementation in AWK