http://www.usf.uos.de/infoservice/doc/

(gawk.info)Arrays


Next: Built-in Prev: Built-in Variables Up: Top
Enter node , (file) or (file)node

Arrays in `awk'
***************

   An "array" is a table of values, called "elements".  The elements of
an array are distinguished by their indices.  "Indices" may be either
numbers or strings.  `awk' maintains a single set of names that may be
used for naming variables, arrays and functions (Note: User-defined
Functions.).  Thus, you cannot have a variable and an
array with the same name in the same `awk' program.


* Array Intro
Introduction to Arrays
* Reference to Elements
How to examine one element of an array.
* Assigning Elements
How to change an element of an array.
* Array Example
Basic Example of an Array
* Scanning an Array
A variation of the `for' statement. It loops through the indices of an array's existing elements.
* Delete
The `delete' statement removes an element from an array.
* Numeric Array Subscripts
How to use numbers as subscripts in `awk'.
* Uninitialized Subscripts
Using Uninitialized variables as subscripts.
* Multi-dimensional
Emulating multi-dimensional arrays in `awk'.
* Multi-scanning
Scanning multi-dimensional arrays.

Next: Built-in Prev: Built-in Variables Up: Top
[ Dokumentation lokal installierter Software ]