[comp.sys.ibm.pc.misc] Passing parameters from a .BAT file to a program - HELP!

brand@cad.Berkeley.EDU (Graham Brand) (10/09/90)

I am having a problem passing a filename parameter from a .BAT
file to the gawk program which it calls. The batch file looks
something like:

	set where = c:\awkprog\
	gawk -f %where%prog.awk "%1"

and is invoked as: batchfil  datafile.
The set command works since the correct gawk program file is
invoked. However, gawk's FILENAME variable is set to "-" (stdin)
indicating that the "%1" parameter is being interpolated incorrectly 
as stdin instead of datafile. 

Does anyone know what is going on here? I am running Gawk V2.11
under DOS 3.3.

Thanks in advance,
-Graham

ariel@seer.UUCP (Catherine Hampton) (10/11/90)

You shouldn't have quotation marks around your %1 parameter -- that;s
probably your problem.

Cathy

_________________________________________________________________
Catherine A. Hampton                  BITNET: hampton@reed.BITNET
CIS: 71601,3130                      Fidonet: Cathy H. @ 1:125/32
GEnie: C.HAMPTON3     Internet: hampton@reed.EDU / ariel@seer.COM