@Deprecated
public class ShellUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
TIMEOUT
Deprecated.
|
Constructor and Description |
---|
ShellUtils()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
exec(java.util.Map flags,
java.lang.String[] cmd,
java.lang.String[] envp,
java.io.File dir,
java.lang.String input,
org.slf4j.Logger log,
java.lang.Object context)
Deprecated.
Executes the given command.
|
static java.lang.String[] |
exec(java.util.Map flags,
java.lang.String cmd,
org.slf4j.Logger log,
java.lang.Object context)
Deprecated.
|
static java.lang.String[] |
exec(java.util.Map flags,
java.lang.String cmd,
java.lang.String input,
org.slf4j.Logger log,
java.lang.Object context)
Deprecated.
|
static java.lang.String[] |
exec(java.lang.String[] cmd,
java.lang.String[] envp,
java.io.File dir,
java.lang.String input,
org.slf4j.Logger log,
java.lang.Object context)
Deprecated.
|
static java.lang.String[] |
exec(java.lang.String cmd,
org.slf4j.Logger log,
java.lang.Object context)
Deprecated.
Executes the given command.
|
static java.lang.String[] |
exec(java.lang.String cmd,
java.lang.String input,
org.slf4j.Logger log,
java.lang.Object context)
Deprecated.
|
public static java.lang.String[] exec(java.lang.String cmd, org.slf4j.Logger log, java.lang.Object context)
Uses bash -l -c cmd
(to have a good PATH set), and defaults for other fields.
requires a logger and a context object (whose toString is used in the logger and in error messages) optionally takes a string to use as input to the command
#exec(String, String, Logger, Object)}
public static java.lang.String[] exec(java.lang.String cmd, java.lang.String input, org.slf4j.Logger log, java.lang.Object context)
#exec(String[], String[], File, String, Logger, Object)}
public static java.lang.String[] exec(java.util.Map flags, java.lang.String cmd, org.slf4j.Logger log, java.lang.Object context)
#exec(Map, String[], String[], File, String, Logger, Object)}
public static java.lang.String[] exec(java.util.Map flags, java.lang.String cmd, java.lang.String input, org.slf4j.Logger log, java.lang.Object context)
#exec(Map, String[], String[], File, String, Logger, Object)}
public static java.lang.String[] exec(java.lang.String[] cmd, java.lang.String[] envp, java.io.File dir, java.lang.String input, org.slf4j.Logger log, java.lang.Object context)
#exec(Map, String[], String[], File, String, Logger, Object)}
public static java.lang.String[] exec(java.util.Map flags, java.lang.String[] cmd, java.lang.String[] envp, java.io.File dir, java.lang.String input, org.slf4j.Logger log, java.lang.Object context)
Uses the given environmnet (inherited if null) and cwd (. if null), feeding it the given input stream (if not null) and logging I/O at debug (if not null).
flags: timeout (Duration), 0 for forever; default 60 seconds
java.lang.IllegalStateException
- if return code non-zero