Skip to main content

Process.run

Process.runcommandargumentsstdinredirect_out_err

Group: System
Aliases: run a command

Documentation

Call a command with a list of arguments.

Arguments

  • command: The command to execute.
  • arguments: The arguments to pass to command.
  • stdin: Any content to pass to the standard input for command.
  • redirect_out_err: Redirect stdout/stderr to Process_Result.

Examples

Call the "echo" command.

      import Standard.Base.System.Platform
import Standard.Base.System.Process

example_run = case Platform.os of
Platform.OS.Windows -> Process.run "PowerShell" ["-Command", "exit 42"]
_ -> Process.run "bash" ["-c", "exit 42"]