freebsd-skq/contrib/awk/test/splitdef.awk
2001-11-02 21:06:08 +00:00

8 lines
154 B
Awk

BEGIN {
data = "abc:easy:as:one:two:three"
FS = ":"
FIELDWIDTHS = "3 1 4 1 2 1 3 1 3 1 5"
n = split(data, a)
printf "n = %d, a[3] = %s\n", n, a[3]
}