BUILT-IN MATHEMATICA SYMBOL
is True if input in the current session is being fed directly to the Mathematica kernel in batch mode.
- $BatchInput is True if input is being taken from a file.
- $BatchInput can be reset during a Mathematica session.
- When $BatchInput is True, Mathematica terminates if it ever receives an interrupt, does not discard input when blank lines are given, and terminates when it receives end-of-file.
In an interactive session, $BatchInput is False by default:
Run a standalone Mathematica kernel with an input file:
Put commands in a file, in this case to evaluate $BatchInput:
Run the command. The session terminates at the end of the file:
The output file contains the value of $BatchInput:
Delete the temporary files:
New in 2