SizeOfSplit

Last edit

Summary: How many elements were created by split()? When I do a split on a field, e.g., {{{ awk split($1,x,"string") }}} How can i find out . . .

Changed:

< }}}

to

> }}}


How many elements were created by split()?

When I do a split on a field, e.g.,

        split($1,x,"string")

How can i find out how many elements x has (I mean other than testing for null string or doing a `for (n in x)' test)?

split() is a function; use its return value:

        n = split($1, x, "string")