Package DE_EPAGES::Core::API::SystemCommand
This Module starts an external process.
@EXPORT_OK |
Functions
RunCommandsInDir
Execute files ending in *.sh, *.cmd or *.bat in $Dir with $Args
Syntax |
$Status = RunCommandsInDir($Dir, $Args, $Output) |
Input |
|
Return |
|
SystemCommand
Executes a system command and throws an error if the command does not terminate with exit code 0. Possible error codes are:
- CommandError - command did not start
- CommandTerminated - command was terminated by signal
- CommandFailed - command did not start finish with exit code 0
Syntax |
SystemCommand( $CommandLine, $hOptions ); SystemCommand( $aCommandLine, $hOptions ); $Output = SystemCommand( $CommandLine, $hOptions ); |
Example |
SystemCommand( ['java', '-version'], { 'Print' => 1 }); $Output = SystemCommand( "perl -v", { 'Capture' => 1 }); |
Input |
|
Return |
|