[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

System User's Guide: Operating System and Devices

Displaying the Value of an Environment Variable (printenv Command)

To display the values of environment variables, use the printenv command. If you specify the Name parameter, the system only prints the value associated with the parameter you requested. If you do not specify the Name parameter, the printenv command displays all current environment variables, showing one Name =Value sequence per line.

For example, to find the current setting of the MAILMSG environment variable, type:

printenv MAILMSG

Press Enter.

The command returns the value of the MAILMSG environment variable. For example:

YOU HAVE NEW MAIL

See the printenv command in the AIX 5L Version 5.2 Commands Reference for the complete syntax.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]