set(5)
set(1fmli)
_________________________________________________________________
set, unset -- set and unset local or global environment variables
Synopsis
set [-l variable[=value]] . . .
set [-e variable[=value ] ] . . .
set [-ffile variable[=value ] ] . . .
unset -l variable . . .
unset -ffile variable . . .
Description
The set command sets variable in the environment, or adds
variable=value to file. If variable is not equated it to a value, set
expects the value to be on standard input. The unset command removes
variable. Note that the FMLI predefined, read-only variables (such as
ARG1), may not be set or unset.
FMLI inherits the UNIX environment when invoked:
-l
sets or unsets the specified variable in the local environment.
Variables set with -l will not be inherited by processes
invoked from FMLI.
-e
sets the specified variable in the UNIX environment. Variables
set with -e will be inherited by any processes started from
FMLI. Note that these variables cannot be unset.
-ffile
sets or unsets the specified variable in the global
environment. The argument file is the name, or pathname, of a
file containing lines of the form variable=value. file will be
created if it does not already exist. Note that no space
intervenes between -f and file.
Note that at least one of the above options must be used for each
variable being set or unset. If you set a variable with the -ffilename
option, you must thereafter include filename in references to that
variable. For example, ${(file)VARIABLE}.
Examples
Storing a selection made in a menu:
name=Selection 2
action=`set -l SELECTION=2`close
Notices
Variables set to be available to the UNIX environment (those set using
the -e option) can only be set for the current fmli process and the
processes it calls.
When using the -f option, unless file is unique to the process, other
users of FMLI on the same machine will be able to expand these
variables, depending on the read/write permissions on file.
A variable set in one frame may be referenced or unset in any other
frame. This includes local variables.
When a variable is evaluated that does not specifically reference a
file, the local environment and UNIX system environment are searched
in that order. (When a set -l and a set -e is done for the same
variable, the variable evaluates to the value used in the set -l
command.)
References
env(1), sh(1)
_________________________________________________________________
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004
See also set(1tcl)
See also set(3C++std)
Man(1) output converted with
man2html