Execution of Commands
Shell command | Execute program | Replace current program with new executed program | |
---|---|---|---|
C | system("command"); | execl(path, args); or execv(path, arglist); |
|
C++ | |||
Objective-C | ; | ||
C# | System.Diagnostics.Process.Start(path, argstring); | ||
F# | |||
Go | exec.Run(path, argv, envv, dir, exec.DevNull, exec.DevNull, exec.DevNull) | os.Exec(path, argv, envv) | |
Visual Basic | Interaction.Shell(command «, WindowStyle» «, isWaitOnReturn») | ||
Visual Basic .NET | Microsoft.VisualBasic.Interaction.Shell(command «, WindowStyle» «, isWaitOnReturn») | System.Diagnostics.Process.Start(path, argstring) | |
D | std.process.system("command"); | std.process.execv(path, arglist); | |
Java | Runtime.exec(command); or new ProcessBuilder(command).start; |
||
JavaScript |
WScript.CreateObject ("WScript.Shell").Run(command «, WindowStyle» «, isWaitOnReturn»); | WshShell.Exec(command) | |
Common Lisp | (shell command) | ||
Scheme | (system command) | ||
ISLISP | |||
Pascal | system(command); | ||
OCaml | Sys.command command, Unix.open_process_full command env (stdout, stdin, stderr),... | Unix.create_process prog args new_stdin new_stdout new_stderr, ... | Unix.execv prog args or Unix.execve prog args env |
Standard ML | OS.Process.system command | Unix.execute (path, args) | Posix.Process.exec (path, args) |
Haskell (GHC) | System.system command | System.Process.runProcess path args ... | Posix.Process.executeFile path True args ... |
Perl | system(command) or $output = `command` |
exec(path, args) | |
Ruby | system(command) or output = `command` |
exec(path, args) | |
PHP | system(command) or $output = `command` or exec(command) or passthru(command) |
||
Python | os.system(command) or subprocess.Popen(command) |
os.execv(path, args) | |
S-Lang | system(command) | ||
Fortran | CALL SYSTEM (command, status) or status = SYSTEM (command) |
||
Windows PowerShell | ::Start(command) | «Invoke-Item »program arg1 arg2 … |
^a Compiler-dependent extension.
Read more about this topic: Comparison Of Programming Languages (basic Instructions)
Famous quotes containing the words execution of, execution and/or commands:
“My weakness has always been to prefer the large intention of an unskilful artist to the trivial intention of an accomplished one: in other words, I am more interested in the high ideas of a feeble executant than in the high execution of a feeble thinker.”
—Thomas Hardy (18401928)
“I herewith commission you to carry out all preparations with regard to ... a total solution of the Jewish question in those territories of Europe which are under German influence.... I furthermore charge you to submit to me as soon as possible a draft showing the ... measures already taken for the execution of the intended final solution of the Jewish question.”
—Hermann Goering (18931946)
“They went to him and woke him up, shouting, Master, Master, we are perishing! And he woke up and rebuked the wind and the raging waves; they ceased, and there was a calm. He said to them, Where is your faith? They were afraid and amazed, and said to one another, Who then is this, that he commands even the winds and the water, and they obey him?”
—Bible: New Testament, Luke 8:24-25.