({{, (RefLink[$BatchOutput, paclet:ref/$BatchOutput])
is (RefLink[True, paclet:ref/True]) if output in the current session is being sent in batch mode, suitable for reading by other programs. }})

OpenersNotesSection(Spacer1)Details

The initial value of (RefLink[$BatchOutput, paclet:ref/$BatchOutput]) is typically determined by a command-line option when the Wolfram System session is started.

(RefLink[$BatchOutput, paclet:ref/$BatchOutput]) cannot be reset during a Wolfram System session.

When (RefLink[$BatchOutput, paclet:ref/$BatchOutput]) is set to (RefLink[True, paclet:ref/True]), the Wolfram Language generates all output in (RefLink[InputForm, paclet:ref/InputForm]), with the (RefLink[PageWidth, paclet:ref/PageWidth]) option effectively set to (RefLink[Infinity, paclet:ref/Infinity]), does not give (RefLink[In, paclet:ref/In]) and (RefLink[Out, paclet:ref/Out]) labels, and does not give any banner when it starts up.

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

In an interactive session, (RefLink[$BatchOutput, paclet:ref/$BatchOutput]) is (RefLink[False, paclet:ref/False]):

$BatchOutput

Run a standalone Wolfram Language kernel with an input file:

in=CreateTemporary[];
out=CreateTemporary[];

$WolframLanguageKernel=If[
$OperatingSystem==="Windows",
FileNameJoin[{$InstallationDirectory,"wolfram"}],
First[$CommandLine]
]

template=StringTemplate["\"`wolfram`\" -noprompt < `in`"];
wolfram=TemplateApply[template,<|
"wolfram"->$WolframLanguageKernel,
"in"->in
|>]

Put commands in a file, in this case to evaluate (RefLink[$BatchOutput, paclet:ref/$BatchOutput]):

FileTemplateApply[
StringTemplate[
"Put[$BatchOutput, \"`out`\"]"
],
<|"out"->StringReplace[out,$PathnameSeparator->"/"]|>,
in]

FilePrint[in]

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

Run[wolfram]

The output file contains the value of (RefLink[$BatchOutput, paclet:ref/$BatchOutput]):

FilePrint[out]

Delete the temporary files:

DeleteFile[{in,out}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[$BatchInput, paclet:ref/$BatchInput])  ▪  (RefLink[$Linked, paclet:ref/$Linked])  ▪  (RefLink[$CommandLine, paclet:ref/$CommandLine])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Global System Information, paclet:tutorial/GlobalSystemInformation])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Standalone Wolfram Language Kernels, paclet:guide/StandaloneWolframLanguageKernels])}})}})