🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #5450

null as variable in batch file

#5450
From: ROBIN
Date: Tue, 11 Feb 1986 01:48
14 lines
996 bytes
Does anyone know how to detect a null as variable input in a batch file?
Specifically:

foo %1   --how do I detect case where %1 is omitted, thus avoiding
	   an error?  I've tried: 
                       if %1==''
                       if %1==' '
                       if %1==<CTRL @>
           all to no avail.  Any help or pointers would be appreciated.

Max S. Robin
AT&T Bell Laboratories
201-386-6865
email:whuxg!2212msr
Technical Details
Message-ID: <534@whuts.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuts!2212msr

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 exptools; site whuts.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuts!2212msr
From: 2212msr@whuts.UUCP (ROBIN)
Newsgroups: net.micro.pc,net.micro
Subject: null as variable in batch file
Message-ID: <534@whuts.UUCP>
Date: Mon, 10-Feb-86 20:48:44 EST
Article-I.D.: whuts.534
Posted: Mon Feb 10 20:48:44 1986
Date-Received: Wed, 12-Feb-86 07:34:00 EST
Distribution: net
Organization: AT&T Bell Laboratories
Lines: 14