Commit | Line | Data |
---|---|---|
b5dc1377 | 1 | .\" Copyright (c) 1980, 1990 The Regents of the University of California. |
4863c0b1 | 2 | .\" All rights reserved. |
ae8545ab | 3 | .\" |
b5dc1377 | 4 | .\" %sccs.include.redist.man% |
4863c0b1 | 5 | .\" |
b5dc1377 | 6 | .\" @(#)printenv.1 6.3 (Berkeley) %G% |
ae8545ab | 7 | .\" |
b5dc1377 CL |
8 | .Dd |
9 | .Dt PRINTENV 1 | |
ae8545ab | 10 | .UC |
b5dc1377 CL |
11 | .Sh NAME |
12 | .Nm printenv | |
13 | .Nd print out the environment | |
14 | .Nm env | |
15 | .Nd set and print out the environment | |
16 | .Sh SYNOPSIS | |
17 | .Nm printenv | |
18 | .Op Ar name | |
19 | .Nm env | |
20 | .Op Fl | |
21 | .Op Ar name=value \&... | |
22 | .Op Ar command | |
23 | .Sh DESCRIPTION | |
24 | .Nm Printenv | |
4863c0b1 | 25 | prints out the names and values of the variables in the environment, |
b5dc1377 CL |
26 | with one name/value pair per line. If |
27 | .Ar name | |
28 | is specified, only | |
4863c0b1 | 29 | its value is printed. |
b5dc1377 | 30 | .Pp |
ae8545ab | 31 | If a |
b5dc1377 | 32 | .Ar name |
ae8545ab | 33 | is specified and it is not defined in the environment, |
b5dc1377 | 34 | .Nm printenv |
ae8545ab | 35 | returns exit status 1, else it returns status 0. |
b5dc1377 CL |
36 | .Pp |
37 | .Nm Env | |
38 | executes | |
39 | .Ar command | |
40 | after modifying the environment as | |
41 | specified on the command line. The option | |
42 | .Ar name=value | |
43 | specifies | |
44 | an environmental variable, | |
45 | .Ar name , | |
46 | with a value of | |
47 | .Ar value . | |
48 | The option | |
49 | .Fl | |
50 | causes | |
51 | .Nm env | |
52 | to completely ignore the environment | |
4863c0b1 | 53 | it inherits. |
b5dc1377 CL |
54 | .Pp |
55 | If no command is specified, | |
56 | .Nm env | |
57 | prints out the names and values | |
4863c0b1 | 58 | of the variables in the environment, with one name/value pair per line. |
b5dc1377 CL |
59 | .Sh SEE ALSO |
60 | .Xr csh 1 , | |
61 | .Xr sh 1 , | |
62 | .Xr execvp 3 , | |
63 | .Xr environ 7 | |
64 | .Sh HISTORY | |
65 | .Nm Printenv | |
66 | appeared in 3 BSD. | |
67 | .Sh BUGS | |
68 | .Nm Env | |
69 | doesn't handle commands with equal (``='') signs in their | |
4863c0b1 | 70 | names, for obvious reasons. |