Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Systems Interfaces & Deployment > Calling External Programs >

RunThrough

RunThrough["command", expr]
executes an external command, giving the printed form of expr as input, and taking the output, reading it as Mathematica input, and returning the result.
  • RunThrough writes the InputForm of expr on the standard input for command, then reads its standard output, and feeds it into Mathematica.
  • RunThrough starts command, then gives input to command, then terminates the input.
Run a Mathematica kernel in text mode, having it put a result in a temporary output file:
The result is now in the file:
Delete the temporary file:
Run a Mathematica kernel in text mode, having it put a result in a temporary output file:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
The result is now in the file:
Delete the temporary file:
In[5]:=
Click for copyable input
New in 1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team