Method RunShellCommandAndWaitResult
RunShellCommandAndWaitResult(string, string?, bool)
Executes a shell command and waits for the result.
public static string? RunShellCommandAndWaitResult(string command, string? arguments = null, bool multiLineResult = false)
Parameters
command
stringThe shell command to execute.
arguments
stringOptional arguments to pass to the command.
multiLineResult
boolIf
true
, the method returns the full output of the command. Iffalse
, only the first line of the output is returned.
Returns
- string
The output of the command if successful; otherwise,
null
.