Hello.

I do not know how portable / desired, but stumbled upon

  #?0|kent:src$ printf 'a\0b\0c\0' | gawk 'BEGIN{FS="\0"} {for(i=0; i < NF; 
++i) print i, $i}'
  0 abc
  1 a
  2 b
  3 c
  #?0|kent:src$ printf 'a\0b\0c\0' | mawk 'BEGIN{FS="\0"} {for(i=0; i < NF; 
++i) print i, $i}'
  0 abc
  1 a
  2 b
  3 c
  #?0|kent:src$ printf 'a\0b\0c\0' | nawk 'BEGIN{FS="\0"} {for(i=0; i < NF; 
++i) print i, $i}'
  0 a
  #?0|kent:src$ printf 'a\0b\0c\0' | busybox.static awk 'BEGIN{FS="\0"} 
{for(i=0; i < NF; ++i) print i, $i}'
  0 a
  0 b
  0 c

For nawk this is https://github.com/onetrueawk/awk/issues/165.

Ciao,

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to