GETENV(3) — UNIX Programmer’s Manual
NAME
getenv − value for environment name
SYNOPSIS
#include <stdlib.h>
char ∗getenv(char ∗name);
DESCRIPTION
Getenv searches the environment list (see environ(7)) for a string of the form name=value and returns a pointer to the string value if such a string is present, otherwise getenv returns the value 0 (NULL).
RETURN VALUE
Upon successful completion, getenv returns a pointer to a string containing the value for the specified name, or a NULL pointer if the specified name cannot be found. Unsuccessful completion results in the return of a NULL pointer.
SEE ALSO
7th Edition — August 1, 1992