penv(1f) - [M_system:ENVIRONMENT] print all or part of environment in formats readable by various shells (LICENSE:PD)
Synopsis
Description
Options
Usage
Exit Status
See Also
Author
License
penv [variable...] [ -C| -B| -v]penv [ --help| --version]
If no arguments are given, penv(1f) prints the entire environment. If one or more variable names are given, it prints the value of each one that is set, and nothing for each one that is not set.
-C print output in a form that can be sourced into a C shell (eg. as a setenv(1) command). -B print output in a form that can be sourced into a Bourne shell. -v values only. Do not print variable names variable(s) if variable names are given, print the value for each one that is set. If quoted may include basic globbing where "*" represents any string and "?" represents any single character. The expression must must represent the entire string.
--help display this help and exit --version output version information and exit
Example commands:
penv # print entire environment penv PREFIX* # print environment variables beginning with PREFIX penv HOME TMP LOGNAME USER # print selected variables# csh(1)/tcsh(1) example: % penv -C > readme.csh % source readme.csh # sh(1)/bash(1)/zsh(1) ... example: $ penv -B > readme.sh $ . readme.sh # print specified variable names % penv TMP TEMPDIR TMPDIR TEMP # print variables starting with A or H % penv A* H* # print variables containing LIBRARY % penv *LIBRARY*
The exit status is:
0 if all variables specified were found 1 otherwise
env(1), printenv(1)
John S. Urban
Public Domain
Nemo Release 3.1 | penv (1) | February 23, 2025 |