Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Run a command on the current system shell
ResourceFunction["SystemShellRun"]["command"] runs the specified command in the current $SystemShell, returning information on the outcome. | |
ResourceFunction["SystemShellRun"][command,"prop"] returns only the specified property. |
"ExitCode" | the exit code for the process |
"StandardOutput" | data sent to standard output,as a string |
"StandardError" | data sent to standard error,as a string |
All | an association of all properties (default) |
ProcessDirectory | Inherited | initial working directory |
ProcessEnvironment | Inherited | environment variables to supply |
Run an external command in the current $SystemShell:
In[1]:= |
Out[1]= |
Run a command and get back only what it writes to the standard output channel:
In[2]:= |
Out[2]= |
Run a command and get back only its exit code:
In[3]:= |
Out[3]= |
In[4]:= |
Out[4]= |
Get multiple properties:
In[5]:= |
Out[5]= |
SystemShellRun is a cross-platform shortcut for using RunProcess with $SystemShell:
In[6]:= |
Out[6]= |
In[7]:= |
Out[7]= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License