srfi.98
- Accessing environment variables ¶This srfi defines a portable way to access the underlying system’s environment variables. Gauche supports such procedures built-in (see Environment inquiry), but portable programs may want to use srfi API instead.
[SRFI-98]{srfi.98
}
Returns a string value of an environment variable named by a string name.
If the named environment variable doesn’t exist, #f
is returned.
This is equivalent to sys-getenv
.
(get-environment-variable "PATH") ⇒ "/bin:/usr/sbin:/usr/bin"
[SRFI-98]{srfi.98
}
Returns an assoc list of the name and the value of each environment
variable.
This is equivalent to sys-environ->alist
without
the optional argument.
(get-environment-variables) ⇒ (("PATH" . "/bin:/usr/sbin:/usr/bin") ...)