public class

BashHelper

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.base.BashHelper

Class Overview

Helper to interact with bash terminals.

This helper can be used to retrieve bash environment variables (variables not defined system-wide).

Summary

Public Constructors
BashHelper()
Public Methods
static String env(String varname)
Get an environment variable provided within a Bash interactive session.
static Map<String, String> env()
Get a key-value map of the environment variables provided within a Bash interactive session.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public BashHelper ()

Public Methods

public static String env (String varname)

Get an environment variable provided within a Bash interactive session.

Parameters
varname variable name
Returns
  • the value, or null if none is defined
Throws
NullPointerException if `varname` is null

public static Map<String, String> env ()

Get a key-value map of the environment variables provided within a Bash interactive session.

Returns
  • a map, never null