User Commands  - penv (1)

NAME

penv(1f) - [M_system:ENVIRONMENT] print all or part of environment in formats readable by various shells (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Usage
Exit Status
See Also
Author
License

SYNOPSIS

penv [variable...] [ -C| -B| -v]

penv [ --help| --version]

DESCRIPTION

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.

OPTIONS

    OUTPUT FORMAT

-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.

    INFORMATION

--help display this help and exit
--version
  output version information and exit

USAGE

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*’

EXIT STATUS

The exit status is:
0 if all variables specified were found
1 otherwise

SEE ALSO

env(1), printenv(1)

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 penv (1) February 23, 2025
Generated by manServer 1.08 from 246127c3-071d-4720-9573-2daa4d8ae798 using man macros.