mirror of
https://github.com/envmodules/modules.git
synced 2026-06-18 00:06:53 +08:00
When unsetting (clearing) an environment variable in 'unset-env' procedure, keep track of it in a g_clearedEnvVars array to be able to distinguish later on, in 'getenv' procedure, if variable is equal to an empty string or if it has been unset (cleared).
32 lines
808 B
Groff
32 lines
808 B
Groff
#%Module1.0
|
|
|
|
##############################################################################
|
|
# Modules Revision 3.0
|
|
# Providing a flexible user environment
|
|
#
|
|
# File: getenv/%M%
|
|
# Revision: %I%
|
|
# First Edition: 2018/04/15
|
|
# Last Mod.: %U%, %G%
|
|
#
|
|
# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr
|
|
#
|
|
# Description: Testuite modulefile
|
|
# Command:
|
|
# Sub-Command: getenv, setenv
|
|
#
|
|
# Invocation: load, unload, display, help, test
|
|
# Result: %R{
|
|
# }R%
|
|
# Comment: %C{
|
|
# Check the effect of 'getenv' command on value transmission to
|
|
# variable through the different modulefile evaluation mode
|
|
# }C%
|
|
#
|
|
##############################################################################
|
|
|
|
setenv TS2 [getenv TS1]
|
|
setenv TS3 $env(TS2)
|
|
unsetenv TS4 [getenv TS1]
|
|
unsetenv TS5 [getenv TS4]
|