When using Mathematica script
#!/usr/local/bin/MathematicaScript -script
Print[$ScriptCommandLine]
and running it with some arguments:
$./script.m a=6 z=3 d=423 c=43 x=1
I'm getting the following error:
Get::noopen: -- Message text not found -- (/SystemFiles/CharacterEncodings/ISO8859-1.m)
Get::noopen: -- Message text not found -- (/SystemFiles/CharacterEncodings/ISO8859-1.m)
Get::noopen: -- Message text not found -- (/SystemFiles/CharacterEncodings/ISO8859-1.m)
General::stop: -- Message text not found -- (Get::noopen)
Mathematica could not find its system-wide initialization file "sysinit.m". The following places were searched: . ~ ./Packages ./SystemFiles/KernelInit ./SystemFiles/GraphicsInit
{"./script.m", "a=6", "z=3", "d=423", "c=43", "x=1"}
With fewer number of command line arguments, this and any other script
do not causes errors. How can one fix this issue? I'm running Linux 3.1.0-1-amd64 #1 SMP Tue Jan 10 05:01:58 UTC 2012 x86_64
, together
with Mathematica 8.0.1.0
math -script script.m {2,3,4,5,6}
but this is ugly. The file "sysinit.m" about which Mathematica complains is present in a standard installation directory. $\endgroup$$CommandLine
(not$ScriptCommandLine
) will be shown as""
instead of the full path toMathKernel
as it should be. I think this is a bug. $\endgroup$