Path: utzoo!attcan!uunet!husc6!bloom-beacon!gatech!ncar!noao!ut-sally!nather From: nather@ut-sally.UUCP (Ed Nather) Newsgroups: comp.sys.ibm.pc Subject: Re: GNU awk (gawk) on MS-DOS Summary: MS-DOS gawk doesn't work Keywords: awk gnu gawk Message-ID: <11751@ut-sally.UUCP> Date: 22 May 88 21:12:50 GMT References: <1455@titan.camcon.uucp> <24837@bbn.COM> Organization: U. Texas CS Dept., Austin, Texas Lines: 43 In article <24837@bbn.COM>, kadler@bbn.com (Kyle Adler) writes: > > I seem to have been luckier than some netters in that I've gotten the > GAWK binary (as posted) to do some useful work. The executable seems > to work as advertised for string operations. However, I've had no end > of problems with numeric operations. So have I. I got the book "The AWK Programming Language" by Aho et al. and planned to find out what worked with Gawk and what didn't, and post a summary to the net. I didn't get very far: the first example in the book, even when entered with double insted of single quotes, died a horrid death with a "null pointer assignment" diagnostic. It also managed to clobber a TSR program in memory. > For example, the simple script "{print i++}" results in seemingly > random garbage, as though the machine is trying to print the ASCII > value of the integer. Forcing the variable into decimal format using > "{printf("%3d\n", i++)}" seems to work for integers. Unfortunately, > even printf doesn't work properly for floating point results. The > script "{printf("%7.2f\n", NR/3)}" typically either prints zeroes or > minus zeroes, or else hangs the machine. > I found that *any* numeric value that I tried, using "print", would die, although some of them would work using "printf." I tried only integers. > Has anyone else encountered these sorts of problems with GAWK under > MS-DOS? This program would be indispensable if only it worked. I'm > running it on an AT compatible. By the way, I've gotten the version > for UNIX to compile and run successfully. Well, that's encouraging anyway, and suggests that perhaps the original "port" to MS-DOS was either incomplete, or a partially-ported version was inadvertantly posted instead of the working version. I agree the program would be extremely valuable if it worked. As is, it just raises the frustration level to a very high value. -- Ed Nather Astronomy Dept, U of Texas @ Austin {allegra,ihnp4}!{noao,ut-sally}!utastro!nather nather@astro.AS.UTEXAS.EDU