public class ShellCommandRunnerImpl extends Object implements ShellCommandRunner
Constructor and Description |
---|
ShellCommandRunnerImpl() |
Modifier and Type | Method and Description |
---|---|
String |
execCommand(Map<String,String> env,
String... cmd)
Method to execute a shell command.
|
String |
execCommand(Map<String,String> env,
String[] cmd,
long timeout)
Method to execute a shell command.
|
String |
execCommand(String... cmd)
Method to execute a shell command.
|
String |
getTokenSeparatorRegex()
Token separator regex used to parse Shell tool outputs.
|
public String execCommand(String... cmd) throws IOException
ShellCommandRunner
ShellUtils
interface.execCommand
in interface ShellCommandRunner
cmd
- shell command to execute.IOException
public String execCommand(Map<String,String> env, String[] cmd, long timeout) throws IOException
ShellCommandRunner
ShellUtils
interface.execCommand
in interface ShellCommandRunner
env
- the map of environment key=valuecmd
- shell command to execute.timeout
- time in milliseconds after which script should be marked timeoutIOException
public String execCommand(Map<String,String> env, String... cmd) throws IOException
ShellCommandRunner
ShellUtils
interface.execCommand
in interface ShellCommandRunner
env
- the map of environment key=valuecmd
- shell command to execute.IOException
public String getTokenSeparatorRegex()
ShellCommandRunner
getTokenSeparatorRegex
in interface ShellCommandRunner
Copyright © 2023 The Apache Software Foundation. All rights reserved.