freebsd-skq/contrib/awk/test/splitdef.awk

8 lines
154 B
Awk
Raw Normal View History

2001-11-02 21:06:08 +00:00
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]
}