Subject: bin/32902: awk with null FS
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <i18rabbit@cwazy.co.uk>
List: netbsd-bugs
Date: 02/22/2006 14:30:00
>Number:         32902
>Category:       bin
>Synopsis:       awk with null FS
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 22 14:30:00 +0000 2006
>Originator:     i18rabbit@cwazy.co.uk
>Release:        NetBSD 3.0
>Organization:
>Environment:
System: NetBSD NetBSD 3.0 (MYKERN) #2: Fri Feb 17 13:12:07 AKST 2006 /usr/src/sys/arch/i386/compile/MYKERN i386
Architecture: i386
Machine: i386
>Description:
	when FS is null, awk (nawk) does not split on character boundries
    as mawk and gawk do - and this is an important/critical feature in awk
    regardless of whether POSIX specifies it or not - and it shouldn't
    be too difficult to make nawk do this.  good awk scripts break on
    nawk for no good reason because of this - it wouldn't hurt anything
    to make nawk compatable with mawk and gawk in this regard, and the
    coding shouldn't be too difficult with someone familiar with it.
>How-To-Repeat:

	$ echo hello | awk -F "" '{ while ( ++i <= NF ) print $i }'
	
	this should produce:

    h
    e
    l
    l
    o

    but with nawk, it produces an error saying FS is null.

>Fix:
	NetBSD nawk code needs to be changed.