Xref: utzoo comp.sys.ibm.pc.misc:2437 comp.sys.ibm.pc.hardware:2083 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!bionet!agate!pasteur!cad.Berkeley.EDU!brand From: brand@cad.Berkeley.EDU (Graham Brand) Newsgroups: comp.sys.ibm.pc.misc,comp.sys.ibm.pc.hardware Subject: Passing parameters from a .BAT file to a program - HELP! Message-ID: <28592@pasteur.Berkeley.EDU> Date: 8 Oct 90 22:59:09 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: brand@cad.Berkeley.EDU.UUCP (Graham Brand) Distribution: usa Organization: University of California, Berkeley Lines: 18 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