xref: /original-bsd/usr.bin/printenv/printenv.1 (revision 2301fdfb)
Copyright (c) 1980 The Regents of the University of California.
All rights reserved.

Redistribution and use in source and binary forms are permitted
provided that the above copyright notice and this paragraph are
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was developed
by the University of California, Berkeley. The name of the
University may not be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

@(#)printenv.1 6.2 (Berkeley) 09/27/88

PRINTENV 1 ""
C
NAME
printenv - print out the environment

env - set and print out the environment

SYNOPSIS
printenv [name]

env [-] [name=value ...] [command]

DESCRIPTION
Printenv prints out the names and values of the variables in the environment, with one name/value pair per line. If name is specified, only its value is printed.

If a name is specified and it is not defined in the environment, printenv returns exit status 1, else it returns status 0.

Env executes command after modifying the environment as specified on the command line. The option name=value specifies an environmental variable, name, with a value of value. The option - causes env to completely ignore the environment it inherits.

If no command is specified, env prints out the names and values of the variables in the environment, with one name/value pair per line.

SEE ALSO
csh(1), sh(1), execvp(3), environ(7)
BUGS
Env doesn't handle commands with equal (``='') signs in their names, for obvious reasons.