• $BatchInput is True if input in the current session is being fed directly to the Mathematica kernel in batch mode.
if input is being taken from a file.
• $BatchInput can be reset during a Mathematica session.
• When $BatchInput
terminates if it ever receives an interrupt, does not discard input when blank lines are given, and terminates when it receives end-of-file.
• New in Version 2.