[comp.binaries.ibm.pc.d] Unusual Environment Variables

dlee@pallas.athenanet.com (Doug Lee) (12/19/90)

In article <1990Dec14.143523.23435@mks.com> paul@mks.com (Paul Steinbach) writes:
>One thing to bear in mind when creating environment variables for a UNIX
>style shell like the MKS korn shell is that the variable names can have
>mixed case.  The programs which use the above variable are probably 
>looking for a variable 'DVIDRVFONTS', and will ignore 'dvidrvfonts'.

On a related note, there is one variable I need which I can't seem to get
the MKS shell to accept:  PKZIP.CFG.  This is used by PKZIP to specify where
the configuration file is.  It seems that dots aren't allowed in variable
names in the MKS shell (probably because they aren't allowed in Unix shells,
either :-) ).  Short of attacking PKZIP with a binary editor and, say,
changing the '.' to a '_', is there a solution to this?
-- 
Doug Lee  (dlee@athenanet.com or uunet!pallas!dlee)

wnp@iiasa.ac.at (Wolf PAUL ) (12/20/90)

In article <465@pallas.athenanet.com> dlee@athenanet.com (Doug Lee) writes:
)On a related note, there is one variable I need which I can't seem to get
)the MKS shell to accept:  PKZIP.CFG.  This is used by PKZIP to specify where
)the configuration file is.  It seems that dots aren't allowed in variable
)names in the MKS shell (probably because they aren't allowed in Unix shells,
)either :-) ).  Short of attacking PKZIP with a binary editor and, say,
)changing the '.' to a '_', is there a solution to this?

Well, depending on how you start the MKS shell: you could set the
variable in COMMAND.COM before starting the MKS shell, and it will
duly be exported and available to PKZIP.
--
W.N.Paul, Int. Institute f. Applied Systems Analysis, A-2361 Laxenburg--Austria
PHONE: +43-2236-71521-465            INTERNET: wnp%iiasa@relay.eu.net
FAX:   +43-2236-71313                UUCP:     uunet!iiasa!wnp
HOME:  +43-2236-618514               BITNET:   tuvie!iiasa!wnp@awiuni01.BITNET

andy@mks.com (Andy Toy) (12/21/90)

In article <465@pallas.athenanet.com> dlee@athenanet.com (Doug Lee) writes:
>On a related note, there is one variable I need which I can't seem to get
>the MKS shell to accept:  PKZIP.CFG.  This is used by PKZIP to specify where
>the configuration file is.  It seems that dots aren't allowed in variable
>names in the MKS shell (probably because they aren't allowed in Unix shells,
>either :-) ).  

You're right.  You cannot have dots in variables for the Bourne or Korn
Shell on UNIX.  It may be possible to have PKZIP.CFG in the environment.
The only way to get it into the Korn Shell's environment is to have it
defined before starting the Korn Shell.  If you are starting it from
command.com then just make sure it is already set in command.com or if
you use login then try `login your_login_name PKZIP.CFG="stuff"' or you
could try `exec env PKZIP.CFG="stuff" /bin/sh'.

Another alternative is to use the env command to set the variable
PKZIP.CFG just for pkzip's environment.  For example:

	env PKZIP.CFG='stuff' pkzip ...

You can set an alias for it:  

	alias pkzip='env PKZIP.CFG="stuff" c:/bin/pkzip'
-- 
Andy Toy, Mortice Kern Systems Inc.,       Internet: andy@mks.com
  35 King Street North, Waterloo,       UUCP: uunet!watmath!mks!andy
      Ontario, CANADA N2J 2W9      Phone: 519-884-2251  FAX: 519-884-8861