printenv — Display Current Environment Variable
Synopsis
/usr/ucb/printenv [variable]
Description
Use the printenv command to print the values of the variables in the environment. If a variable is specified, only its value is printed.
Examples
The following example displays the value for the EDITOR environment variable.
castle% printenv EDITOR
/usr/dt/bin/dtpad
castle%
Attributes
See attributes(5) for descriptions of the following attributes:
Attribute Type | Attribute Value |
---|---|
Availability | SUNWscpu |
See Also
csh(1), echo(1), sh(1), stty(1), tset(1B), attributes(5), environ(5)
Diagnostics
If a variable is specified and it is not defined in the environment, printenv returns an exit status of 1.
Get Solaris™ 7 Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.