string getenv ( string name [, string value] )
getenv returns the value of the specified environment variable from the runenv variable.
# print the value of HOME if defined, otherwise print "none" print(getenv("HOME", "none"));
keepenv( string env1 [, string env2, …] )
The keepenv procedure modifies the runenv variable to keep only those environment variables whose names are specified. All others are deleted from the runtime environment. This is used to constrain which environment variables a user may keep when running programs through Privilege Manager for Unix.
# reset the environment to the minimum keepenv("PATH", "TERM", “HOME”, “USER”);
setenv ( string name, string value )
The setenv procedure sets one or more environment variables in the runenv variable.
#set the shell variable setenv("SHELL", "/opt/quest/bin/pmsh");
unsetenv( string env1 [, env2, …+ )
The unsetenv procedure removes the named environment variable from the runenv variable.
The following example deletes the PAGER and EDITOR environment variables from the runtime environment.
unsetenv("PAGER", "EDITOR");
© 2021 One Identity LLC. ALL RIGHTS RESERVED. Feedback Conditions d’utilisation Confidentialité