🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.misc
Article #3699

Passing parameters from a .BAT file to a program - HELP!

#3699
From: Graham Brand
Date: Mon, 08 Oct 1990 22:59
18 lines
1111 bytes
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
Technical Details
Message-ID: <28592@pasteur.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!bionet!agate!pasteur!cad.Berkeley.EDU!brand

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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