Path: utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bbn!mailrus!tut.cis.ohio-state.edu!unix.cc.emory.edu!arnold From: arnold@unix.cc.emory.edu (Arnold D. Robbins) Newsgroups: gnu.utils.bug Subject: ibm pc awk bug Message-ID: <8901201941.AA19629@emoryu1.cc.emory.edu> Date: 20 Jan 89 19:41:08 GMT Sender: bob@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 19 | Date: Thu 19 Jan 89 13:06:44-PST | From: Ted Shapin | Subject: IBM PC AWK bug? | To: info-gnu-emacs@prep.ai.mit.edu | | # The version of GAWK for the IBM-PC that was created by | # Andy Estes and Steve Liberty has a bug in gsub(). | # It doesn't return the correct number of substitions made | # The following program prints "1" instead of "2" | {print gsub(/;/,"")} | # when reading the input record: asdf ; zxcv ; | # Does anyone have a fix? The Unix version does not display this bug, it correctly prints 2. Arnold Robbins -- Emory University Computing Center | "Unix is a Registered DOMAIN: arnold@unix.cc.emory.edu | Bell of AT&T Trademark UUCP: gatech!emoryu1!arnold PHONE: +1 404 727-7636 | Laboratories." BITNET: arnold@emoryu1 FAX: +1 404 727-2599 | -- Donn Seeley