awk bug
John Rupley
rupley at arizona.edu
Sun Feb 7 04:12:40 AEST 1988
In article <672 at pttesac.UUCP>, vanam at 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 at 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)
More information about the Comp.bugs.sys5
mailing list