home *** CD-ROM | disk | FTP | other *** search
- These are a couple of small utilities designed to add some flexibility in
- preparing arguments to commands and setting of environment variables
- in the MSDOS command.com shell. They are also useful under
- 4DOS, although they are not so neccessary there.
-
- Eval runs any named command, after wildcard filename expansion,
- command substitution, and environment variable substitution.
- Since the named command is a sub-process of "eval", setting of environment
- variables will not be useful.
-
- Setenv sets an environment variable into the parent environment, after
- performing the same substitutions as above. It can be used to
- capture the output of any program which writes to stdout. Setenv can
- produce environment variables longer than the MSDOS 127 character
- command line limit, since the expansion is performed internally.
-
- As examples of using setenv in collaboration with simple programs
- that write to stdout, the following are included:
- addpath: add a specified directory to the end of the current path
- inspath: insert a specified directory into the current path
- delpath: delete a specified directory from the current path
- chgpath: change a specified directory into something else.
- e.g.
- setenv PATH `addpath \new\directory`
-
- As examples of using the environment setting routines directly, the
- following are included:
- incr: increment an integer valued environment variable directly
- uprompt: set the variable PROMPT to the current directory, (with forward
- slashes instead of backslashes)
-
- Notes:
- Command.com 4.01 SET command does not work properly when the
- strings get too long. The environment is correct, and is displayed
- correctly by other programs which read it. It seems that COMMAND
- assumes the strings cannot be more than 127 characters. I don't know about
- earlier versions.
-
- 4dos uses backquotes for it's own parsing, so you must protect the
- command substitutions with enclosing double quotes.
-
- ms_sh (bourne shell clone) does not really need this utility, but if
- you use it, it changes what DOS considers to be the environment.
- However this is NOT what sh passes on to child processes so it will
- not do you much good.
-
- Temporary files used for command substitution are all placed in a
- directory pointed to by %TMP (if set). Considerable speed increase
- can be gained by making this a RAMdisk. Also, copying the shell
- there and pointing %COMSPEC at it will speed things up.
-
- These programs (source code and binaries) are placed in the public domain.
-
- R. Brittain 10/19/90
-