({{, (RefLink[$ScriptInputString, paclet:ref/$ScriptInputString]) 
represents input given on the standard input channel to the original operating system command with which the current instantiation of the Wolfram Language was invoked.}})

OpenersNotesSection(Spacer1)Details

If the Wolfram Language kernel is invoked via a (RefLink[wolframscript, paclet:ref/program/wolframscript]) mechanism, the (RefLink[$ScriptInputString, paclet:ref/$ScriptInputString]) contains all input given on standard input.

If the Wolfram Language kernel is run in a way other than via a (RefLink[wolframscript, paclet:ref/program/wolframscript]) mechanism, the (RefLink[$ScriptInputString, paclet:ref/$ScriptInputString]) gives (RefLink[None, paclet:ref/None]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

(RefLink[$ScriptInputString, paclet:ref/$ScriptInputString]) is set to (RefLink[None, paclet:ref/None]) in an interactive session:

$ScriptInputString

Find the (RefLink[wolframscript, paclet:ref/program/wolframscript]) executable:

wolframscript="!\""<>FileNameJoin[{$LaunchDirectory,"wolframscript"}]<>"\"";

Set up appropriate arguments for the operating system:

args=If[$OperatingSystem=="Windows"," -code $ScriptInputString"," -code '$ScriptInputString'"];

(RefLink[$ScriptInputString, paclet:ref/$ScriptInputString]) is set to an empty string in this case, as standard input is empty:

Import[wolframscript<>args,"Text"]

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

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