linux-env

Queries the list of environment variables on a Linux system. You can view the names and values of environment variables set in the Logpresso process.

Command properties

PropertyValue
Command typeDriver query
Required permissionAdministrator
License usageCounted
Parallel executionNot supported
Distributed executionRuns on Data Node (mapper)

Syntax

linux-env

Output fields

FieldTypeDescription
namestringEnvironment variable name
valuestringEnvironment variable value

Error codes

Parsing errors
Error codeMessageDescription
95040no-read-permissionExecuted without administrator privileges
Runtime errors

N/A

Description

The linux-env command calls System.getenv() from the JVM to query the environment variables set in the Logpresso process. For each environment variable, it returns a record containing the name and value fields.

Administrator privileges are required because environment variables may contain system configuration information such as file system paths and user information.

Examples

  1. Query all environment variables

    linux-env
    

    Queries all environment variables set in the Logpresso process.

  2. Search for a specific environment variable

    linux-env
    | search name == "PATH"
    

    Queries the value of the PATH environment variable.

  3. Sort environment variables by name

    linux-env
    | sort name
    

    Queries environment variables sorted by name.