Run
✖
Run
✖
Run["command"]
runs command as an external operating system command, returning the exit code obtained.
Details
- For any expression expr, Run[expr] runs the string corresponding to OutputForm[expr] as an external operating system command.
- Run returns an integer that corresponds, when possible, to the exit code for the command returned by the operating system.
- In a notebook interface, the command executed by Run cannot take interactive input, and its textual output will not be displayed.
- In a terminal interface, the command executed by Run can display text and take standard input from the terminal.
- In a terminal interface, the input line !command will execute an external command.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (1)Survey of the scope of standard use cases
Create a string template for the command to run:
Out[2]=2
Create a temporary file for storing the output:
Out[1]=1
Use TemplateApply to create the command string:
Out[3]=3
Run the command three times, pausing for three seconds each time:
Wolfram Research (1988), Run, Wolfram Language function, https://reference.wolfram.com/language/ref/Run.html.
✖
Wolfram Research (1988), Run, Wolfram Language function, https://reference.wolfram.com/language/ref/Run.html.
Text
Wolfram Research (1988), Run, Wolfram Language function, https://reference.wolfram.com/language/ref/Run.html.
✖
Wolfram Research (1988), Run, Wolfram Language function, https://reference.wolfram.com/language/ref/Run.html.
CMS
Wolfram Language. 1988. "Run." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Run.html.
✖
Wolfram Language. 1988. "Run." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Run.html.
APA
Wolfram Language. (1988). Run. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Run.html
✖
Wolfram Language. (1988). Run. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Run.html
BibTeX
✖
@misc{reference.wolfram_2024_run, author="Wolfram Research", title="{Run}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Run.html}", note=[Accessed: 10-January-2025
]}
BibLaTeX
✖
@online{reference.wolfram_2024_run, organization={Wolfram Research}, title={Run}, year={1988}, url={https://reference.wolfram.com/language/ref/Run.html}, note=[Accessed: 10-January-2025
]}