Difference between revisions of "Ns env"

From AOLserver Wiki
Jump to navigation Jump to search
(imported from WiKit id 552)
 
 
(One intermediate revision by one other user not shown)
Line 14: Line 14:
  
 
: This command provides thread-safe (unlike Tcl env array) access to the environemnt variables of the currently running [[nsd]] process.  The legal ''option''s (which may '''NOT''' be abbreviated) are:
 
: This command provides thread-safe (unlike Tcl env array) access to the environemnt variables of the currently running [[nsd]] process.  The legal ''option''s (which may '''NOT''' be abbreviated) are:
* '''ns_env names'''
+
: '''ns_env names'''
* '''ns_env exists''' ''name''
+
: '''ns_env exists''' ''name''
* '''ns_env get''' ''?-nocomplain? name''
+
: '''ns_env get''' ''?-nocomplain? name''
* '''ns_env set''' ''name value''
+
: '''ns_env set''' ''name value''
* '''ns_env unset''' ''?-nocomplain? name''
+
: '''ns_env unset''' ''?-nocomplain? name''
  
 
: This command has yet to be Tcl_Obj'ified.
 
: This command has yet to be Tcl_Obj'ified.
Line 24: Line 24:
 
'''EXAMPLES'''
 
'''EXAMPLES'''
  
    % ns_env names
+
<pre>
    CONSOLE TERM INIT_VERSION PATH RUNLEVEL PWD PREVLEVEL SHLVL HOME
+
% ns_env names
 +
CONSOLE TERM INIT_VERSION PATH RUNLEVEL PWD PREVLEVEL SHLVL HOME
  
    % ns_env get PATH
+
% ns_env get PATH
    /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
+
/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
  
    % ns_env set USER nsd
+
% ns_env set USER nsd
  
    % ns_env get USER
+
% ns_env get USER
    nsd
+
nsd
  
    % ns_env unset USER
+
% ns_env unset USER
 +
</pre>
  
 
'''SEE ALSO'''
 
'''SEE ALSO'''
Line 41: Line 43:
 
----
 
----
  
[[Category Documentation]] - [[Category Core Tcl API]]
+
[[Category:Documentation]] - [[Category:Core Tcl API]]

Latest revision as of 19:33, 7 February 2009

Man page: http://aolserver.com/docs/tcl/ns_env.html


NAME

ns_env - Return, change or add a value of an environment variable

SYNOPSIS

ns_env option ?arg arg ...?

DESCRIPTION

This command provides thread-safe (unlike Tcl env array) access to the environemnt variables of the currently running nsd process. The legal options (which may NOT be abbreviated) are:
ns_env names
ns_env exists name
ns_env get ?-nocomplain? name
ns_env set name value
ns_env unset ?-nocomplain? name
This command has yet to be Tcl_Obj'ified.

EXAMPLES

 % ns_env names
 CONSOLE TERM INIT_VERSION PATH RUNLEVEL PWD PREVLEVEL SHLVL HOME

 % ns_env get PATH
 /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin

 % ns_env set USER nsd

 % ns_env get USER
 nsd

 % ns_env unset USER

SEE ALSO


-