home *** CD-ROM | disk | FTP | other *** search
-
-
-
- SETENV(1) MS-DOS auxiliary utilities SETENV(1)
-
-
-
- NAME
- setenv - set environment variables, with command and
- variable substitution
-
- SYNOPSIS
- setenv variable [argument ... ]
-
- DESCRIPTION
- setenv is a utility to set DOS environment variables,
- performing wildcard expansion, command substitution and
- variable substitution on the arguments before assigning to
- the variable. The command line is iteratively scanned for
- command substitutions in backquotes (`...`) and environment
- variables (%var), and the resulting text used as the value
- of the environment variable named in the first argument.
- Command substitutions are usually performed by calling
- loading a shell to run the command. If the first character
- of the command is '@', the command is exec'ed directly
- (faster than loading a shell, but only works with exe and
- com files). The magic characters '%','`', and '@' are set
- by #defines in comsub.h so you can change them if you don't
- like them.
-
- When substituting the output of commands, newlines are
- replaced by spaces. Arguments may need to be quoted in order
- that setenv will see the "%" or "`...`" characters,
- depending on which shell you use. The 4DOS shell in
- particular needs to have backquotes protected by double
- quotes. Since variable expansion is performed internally,
- environment variables may be set to values longer than the
- 127 character limit enforced by the MSDOS command line
- length.
-
- DIAGNOSTICS
- Diagnostics are printed for the following errors:
- - unable to locate environment
- - environment overflow
- - out of memory
- - command substitution failed (command not found, or line too long)
-
- EXAMPLES
- setenv cwd `cd`
-
- SEE ALSO
- eval, incr, decr, expr
-
- BUGS
- Tested with 4dos and command shells. With ms_sh bourne
- shell, this program modifies what DOS thinks is the
- environment of the shell, but this does not seem to be what
- is passed on to child processes.
-
-
-
-
- Page 1 (printed 0/3/91)
-
-
-
-
-
-
- SETENV(1) MS-DOS auxiliary utilities SETENV(1)
-
-
- Command.com (at least version 4.01) has trouble displaying
- long environment variables with the SET command, even though
- they are in fact correctly created by setenv.
-
- AUTHOR
- Richard Brittain (richard@calvin.ee.cornell.edu)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-