16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

printenv — Display the values of environment variables<br />

Format<br />

Description<br />

Options<br />

Example<br />

Usage notes<br />

Exit Values<br />

Portability<br />

printenv [name]<br />

tcsh shell: printenv [name]<br />

The printenv command displays the values of environment variables. If the name<br />

argument is specified, only the value associated with name is printed. If it is not<br />

specified, printenv displays the current environment variables, one name=value pair<br />

per line.<br />

If a name argument is specified but is not defined in the environment variable,<br />

printenv returns exit status 1; otherwise it returns status 0.<br />

printenv in the tcsh shell<br />

In the tcsh shell, printenv prints the names and values of all environment variables<br />

or, with name, the value of the environment variable named. See “tcsh — Invoke a<br />

C shell” on page 626.<br />

There are no options.<br />

To find the current setting of the HOME environment variable, enter:<br />

printenv HOME<br />

Related Information<br />

env, tcsh<br />

1. Only one name argument can be specified.<br />

2. printenv SOMENAME is equivalent to echo $SOMENAME for exported<br />

variables.<br />

3. printenv without any arguments is functionally equivalent to env without any<br />

arguments.<br />

0 Successful completion<br />

1 Failure due to one of the following:<br />

v More than one environment variable was specified<br />

v An option was specified (printenv has no options)<br />

printenv is compatible with the AIX printenv utility.<br />

printenv<br />

Chapter 2. Shell command descriptions 513

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!