[ Table Of Contents | Keyword Index ]

ns_env(n) 4.99 "NaviServer Built-in Commands"

NAME

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

TABLE OF CONTENTS

    TABLE OF CONTENTS
    SYNOPSIS
    DESCRIPTION
    COMMANDS
    EXAMPLES
    SEE ALSO

SYNOPSIS

ns_env names
ns_env exists name
ns_env get ?-nocomplain? name
ns_env set name value
ns_env unset ?-nocomplain? name

DESCRIPTION

This command provides thread-safe (unlike Tcl env array) access to the environemnt variables of the currently running nsd process.

COMMANDS

ns_env names
ns_env exists name
ns_env get ?-nocomplain? name
ns_env set name value
ns_env unset ?-nocomplain? name

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

nsd