Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getenv(3) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

NLgetfile

putenv

nl_langinfo

setlocale

environment

sh



GETENV(3,L)                 AIX Technical Reference                 GETENV(3,L)



-------------------------------------------------------------------------------
getenv, NLgetenv



PURPOSE

Returns the value of an environment variable.

LIBRARY

Standard C Library (libc.a)

SYNTAX



                char *getenv (name)         char *NLgetenv (name)
                char *name;                 char *name;



DESCRIPTION

The getenv subroutine searches the environment list for a string of the form
name=value.  Environment variables are sometimes called shell variables since
they are frequently set with shell commands.

Note:  NLgetenv is a front-end to the nl_langinfo subroutine, and the values
       returned by nl_langinfo are initialized by calling setlocale for the
       current locale (see "setlocale" and "nl_langinfo").  If nl_langinfo
       returns a NULL, then NLgetenv calls getenv.

RETURN VALUE

The getenv subroutine returns a pointer to the value in the current environment
if such a string is present.  If such a string is not present, a NULL pointer
is returned.

RELATED INFORMATION

In this book:  "NLgetfile," "putenv," "nl_langinfo," "setlocale," and
"environment."

The sh command in AIX Operating System Commands Reference.

"Introduction to International Character Support" in Managing the AIX Operating
System.

AIX Guide to Multibyte Character Set (MBCS) Support.





Processed November 7, 1990        GETENV(3,L)                                 1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026