Package com.pnfsoftware.jeb.util.base
Class BashUtil
java.lang.Object
com.pnfsoftware.jeb.util.base.BashUtil
Helper to interact with
bash terminals.
This helper can be used to retrieve bash environment variables (variables not defined system-wide).
-
Method Summary
-
Method Details
-
env
Get an environment variable provided within a Bash interactive session.- Parameters:
varname- variable name- Returns:
- the value, or null on error or if none is defined
-
exec
Run a Bash interactive command.- Parameters:
timeoutMs- timeout in milliseconds, must be equal or greater than zerocmd- the bash command:bash -ic <command>- Returns:
- the command result, null on error or if the execution timed-out
-