NAME
printenv —
list environment variables
SYNOPSIS
printenv |
[-0]
[variable]… |
DESCRIPTION
Writes all variables in the environment in their original format
(KEY=VALUE)
and order, separated by newlines, to the standard output stream.
If variables are specified, writes just their values, in the order specified, separated by newlines.
OPTIONS
-0,--null- Separate lines by NUL characters instead of newlines.
EXIT STATUS
1 if some of the variables specified didn't exist.
SEE ALSO
HISTORY
Appeared, fully formed, in 2BSD as printenv(UCB):
printenv - print out the environment
with a SYNOPSIS of
printenv [ name ]
but only checking that the names
start with
name — printenv
A would write the values of both
A and AA.
3BSD fixes this.
AT&T System V Release 4
UNIX includes 3BSD
printenv in /usr/ucb.
Multiple variables and
-0 are extensions, originating from the GNU
system.