.\" 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) %G% .\" .TH PRINTENV 1 "" .UC .SH NAME printenv \- print out the environment .br env \- set and print out the environment .SH SYNOPSIS .B printenv [name] .br .B env [-] [name=value ...] [command] .SH DESCRIPTION .I Printenv prints out the names and values of the variables in the environment, with one name/value pair per line. If \fIname\fP is specified, only its value is printed. .PP If a .I name is specified and it is not defined in the environment, .I printenv returns exit status 1, else it returns status 0. .PP \fIEnv\fP executes \fIcommand\fP after modifying the environment as specified on the command line. The option \fIname=value\fP specifies an environmental variable, \fIname\fP, with a value of \fIvalue\fP. The option \fI-\fP causes \fIenv\fP to completely ignore the environment it inherits. .PP If no command is specified, \fIenv\fP prints out the names and values of the variables in the environment, with one name/value pair per line. .SH SEE ALSO csh(1), sh(1), execvp(3), environ(7) .SH BUGS \fIEnv\fP doesn't handle commands with equal (``='') signs in their names, for obvious reasons.