🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #677

Re: awk bug

#677
From: John Rupley
Date: Sat, 06 Feb 1988 18:12
27 lines
1310 bytes

In article <672@pttesac.UUCP>, vanam@pttesac.UUCP (Marnix van Ammers) writes:
> While trying to install a new program I ran across a bug in our Sys
> V, release 2.1.1 (AT&T 3B20) awk.  In our awk the following pattern
> always matches (even if there are 5 or less fields on the current
> line):
> 
> if $6 != ""
> 
> This does not happen on the awk on my 3B1 version 3.51 .
> 
> Is this a known bug or what?

Could it be a corrupt copy of awk on your release 2 system?
The following code excutes properly with my SysV.r2 awk and
with the new awk (your 3.51 version?):

echo $* | awk '$6 != ""	{print "$6_!=_zerolength", NR, NF, $6}'
echo $* | awk '{if ($6 != "")print "$6_!=_zerolength", NR, NF, $6}'


John Rupley
    internet: rupley@megaron.arizona.edu
    uucp: ..{ihnp4 | hao!noao}!arizona!rupley
    Dept. Biochemistry, Univ. Arizona, Tucson  AZ  85721
    voice: (602)321-3929 (Office)   or   (602)325-4533 (Home)
Technical Details
Message-ID: <3748@megaron.arizona.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!hao!noao!arizona!rupley
References: <672@pttesac.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!hao!noao!arizona!rupley
From: rupley@arizona.edu (John Rupley)
Newsgroups: comp.bugs.sys5
Subject: Re: awk bug
Message-ID: <3748@megaron.arizona.edu>
Date: 6 Feb 88 18:12:40 GMT
References: <672@pttesac.UUCP>
Organization: U of Arizona CS Dept, Tucson
Lines: 27
Keywords: awk bug
Summary: no bug