Search code examples
arraysnawk

Array size in nawk


I am reading Introduction to Arrays for nawk

It says:

Arrays in awk superficially resemble arrays in other programming languages; but there are fundamental differences. In awk, you don't need to specify the size of an array before you start to use it.

Then whats the limit of members I can have in that array? How do I know that? And is this error-pron? (because I know it cannot be infinite :D)


Solution

  • nawk has limits on various things from experience although I have no idea what they are and can't find a reference. gawk however doesn't so if you want security against hitting limits, try gawk. Ref here:

    http://oreilly.com/catalog/unixnut3/chapter/ch11.html#ch11_09.htm