$BatchOutput

$BatchOutput
is True if output in the current session is being sent in batch mode, suitable for reading by other programs.

DetailsDetails

  • The initial value of $BatchOutput is typically determined by a commandline option when the Wolfram System session is started.
  • $BatchOutput cannot be reset during a Wolfram System session.
  • When $BatchOutput is set to True, the Wolfram Language generates all output in InputForm, with the PageWidth option effectively set to Infinity, does not give In and Out labels, and does not give any banner when it starts up.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

In an interactive session, $BatchOutput is False:

In[1]:=
Click for copyable input
Out[1]=

Run a standalone Wolfram Language kernel with an input file:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Put commands in a file, in this case to evaluate $BatchOutput:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input

Run the command. The session terminates at the end of the file:

In[6]:=
Click for copyable input
Out[6]=

The output file contains the value of $BatchOutput:

In[7]:=
Click for copyable input

Delete the temporary files:

In[8]:=
Click for copyable input
Introduced in 1991
(2.0)