lixj@acf4.NYU.EDU (Xiaojian Li) (12/21/89)
Hi, I've downloaded GNUAWK210 for MSDOS from simtel, but have being unable to run it on my AT compatible, the error message looks like this: \C> gawk 'BEGIN {print "OK"}' filename ...can not open '(null)' to read, no such file or directory... any explaination for this trouble? Thanks in advance. Xiaojian
harper@rigel.uucp (David Harper) (12/26/89)
In article <20012@acf4.NYU.EDU> lixj@acf4.NYU.EDU (Xiaojian Li) writes: >Hi, > >I've downloaded GNUAWK210 for MSDOS from simtel, but have being unable >to run it on my AT compatible, the error message looks like this: > >\C> gawk 'BEGIN {print "OK"}' filename > ...can not open '(null)' to read, no such file or directory... > >any explaination for this trouble? There are several variations of AWK on simtel - you might try downloading one of the others and see if you get the same results. Also, you might try putting the awk script in a separate file and invoking it with the '-f' option and see what that does. Dave Harper - Convex Computer Corp. E-mail address: 3000 Waterview Pky. Richardson, TX 75081 harper@convex.COM (214) 497-4525 (W) (214) 727-4206 (H)
tarvaine@tukki.jyu.fi (Tapani Tarvainen) (12/27/89)
>In article <20012@acf4.NYU.EDU> lixj@acf4.NYU.EDU (Xiaojian Li) writes: >I've downloaded GNUAWK210 for MSDOS from simtel, but have being unable >to run it on my AT compatible, the error message looks like this: >\C> gawk 'BEGIN {print "OK"}' filename > ...can not open '(null)' to read, no such file or directory... DOS doesn't understand single quotes ('). If you want to give the script to gawk in the command line, you must enclose it in double quotes ("). If the script itself contains double quotes like in your example, you have to put it in a file and use the -f option. (Or junk command.com and get something like 4DOS.) -- Tapani Tarvainen (tarvaine@tukki.jyu.fi, tarvainen@finjyu.bitnet)
lixj@acf4.NYU.EDU (Xiaojian Li) (12/30/89)
Thanks to Fred Brundick, Stephen Smith, James, Eric M. Boehm, Min-Woong Sohn, Mintin R. Wittmann and Marty Cohen, I got GNUawk worked on my PC. The following is the summary: the problem is with MSDOS, it doesn't know the words within the single quota is one argument to gawk. One has to use either double quota or a command file, gawk "BEGIN {print \"OK\"}" ... gawk -f program ... there is no more problem when I try this on Zenith286. Another tricky thing is that I have to add the current working directory into the environment variable APPEND, append <current dir>... when working on my AT clone, then gawk works no less than impressive. --XJL