The awk extraction and reporting language does not directly support enumeration. However, it is possible to simulate enumberation by using a variable and [[nudge?]] operator combination. In the following example we enumerate the values for a set of fruit names:
BEGIN { n=1 # We are enumerating from a value of one apple=++n banana=++n cherry=++n # We give raspberry an explicit value of eighteen n=raspberry=18 }