man.bsd.lv manual page server

Manual Page Search Parameters

PRINTENV(1) General Commands Manual PRINTENV(1)

printenv, envprint out the environment, set and print environment

printenv [name]

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

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.

csh(1), sh(1), execvp(3), environ(7)

The printenv command appeared in 3.0BSD.

Env doesn't handle commands with equal (``='') signs in their names, for obvious reasons.

BSD 3 June 6, 1993 PRINTENV(1)