🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #57845

Re: Environment vars [Was: Basic help: Newbie alert]

#57845
From: Ian Staples
Date: Wed, 09 Feb 2000 00:00
53 lines
3113 bytes
In article <m23dr6jkhm.fsf@star07224.galstar.com>, 
Bruce Schultz <jbs@galstar.com> wrote:
>ianst@refer.to.sig.au (Ian Staples) writes:
>
>> In article <m2u2jokf32.fsf@star07224.galstar.com>, 
>> Bruce Schultz <jbs@galstar.com> wrote:
>> >It needs to be an environment variable.  If you're using bash as a
>> >command shell, you place "export NNTPSERVER=news.myisp.com"
>> >(substitute the proper address) in your .bashrc file.  If you're
>> >using csh or tcsh, then use the "setenv" command to do the same.
>> >
>> >If you're in windows, you can use a "set" command in config.sys.
>> 
>> I've never used "set" in config.sys, only in autoexec.bat.
>> 
>> Does it work in either place?
>
>Now that you mention it, I'm not sure.  It's been a while since I had
>to work in Windows or DOS.  I vaguely recall using set in the
>config.sys file. [...]

Between us we're not being very helpful on this point!  8-)

Okay, okay, why not look it up?  (i.e. RTFM :)

Well, one reason is that it's damn hard to find one!  But, not to 
be discouraged, I persevered and eventually came up with one for 
MSDOS 4.0.  :)

It confirmed my original assumption:  SET is not a command to
be used in CONFIG.SYS.  It can be used in AUTOEXEC.BAT to set 
up environment variables for the whole session, or it can be
used from any batch file to set up specific variables that can
remain resident or be deleted as chosen.  (In fact you can
delete any of these variables by SETting them to null as in:
     SET varname=
with nothing after the "=".)

A major use of SET in the "good old days" was to set environment
variables prior to running a batch file.  This enabled a degree
of flexibility in batch files without editing the file itself 
and without the need for repetitive typing of a particular
command line parameter for that session.  Used this way you
simply issued the SET command for that job from the DOS command
line:    SET mydir=c:\work\fred   for example.  The batch file
then used the variable %mydir% as defined for the current job.

Cheers,  Ian S.

ianstDELETE@THISdpi.qld.gov.au


Technical Details
Message-ID: <87r9kv$pv7$1@bunyip.cc.uq.edu.au>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-aus.computers.ibm-pc.mbox.zip!not-for-mail
References: <slrn898r9e.dle.marathon@local.host.invalid> <Z73m4.1250$Td1.31123@nnrp3.clara.net> <slrn89ji9v.55o.marathon@local.host.invalid> <m2u2jokf32.fsf@star07224.galstar.com> <87jafq$7pf$2@bunyip.cc.uq.edu.au> <m23dr6jkhm.fsf@star07224.galstar.com>

Show Full Headers
Complete Article Headers
Message-ID: <87r9kv$pv7$1@bunyip.cc.uq.edu.au>
Subject: Re: Environment vars [Was: Basic help: Newbie alert]
Date: Wed, 09 Feb 2000 00:00:00 +0000
From: ianst@refer.to.sig.au (Ian Staples)
References: <slrn898r9e.dle.marathon@local.host.invalid> <Z73m4.1250$Td1.31123@nnrp3.clara.net> <slrn89ji9v.55o.marathon@local.host.invalid> <m2u2jokf32.fsf@star07224.galstar.com> <87jafq$7pf$2@bunyip.cc.uq.edu.au> <m23dr6jkhm.fsf@star07224.galstar.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-aus.computers.ibm-pc.mbox.zip!not-for-mail
X-Deja-AN: 583580686
X-Complaints-To: news@uq.edu.au
X-Trace: bunyip.cc.uq.edu.au 950086111 26599 203.25.1.208 (9 Feb 2000 08:48:31 GMT)
Organization: Speaking Personally
NNTP-Posting-Date: 9 Feb 2000 08:48:31 GMT
Newsgroups: news.software.readers,aus.computers.ibm-pc