$ScriptCommandLine

$ScriptCommandLine
is a list of strings giving the elements of the command line with which the standalone Wolfram System script was invoked.

DetailsDetails

  • If the Wolfram Language kernel was invoked via a wolframscript mechanism, the $ScriptCommandLine contains the elements of the command line, starting with the name of the script.
  • If the Wolfram Language kernel was run in a way other than via a wolframscript mechanism, the $ScriptCommandLine gives an empty list.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

$ScriptCommandLine is empty in an interactive session:

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

Find the wolframscript executable:

In[2]:=
Click for copyable input

Set up appropriate arguments for the operating system:

In[3]:=
Click for copyable input

$ScriptCommandLine will include the executable and its arguments when launched:

In[4]:=
Click for copyable input
Out[4]=
Introduced in 2010
(8.0)
Translate this page: