RosettaCodeData/Task/Program-name/Mathematica/program-name.math
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

12 lines
253 B
Text

#!/usr/bin/env MathKernel -script
ScriptName[] = Piecewise[
{
{"Interpreted", Position[$CommandLine, "-script", 1] == {}}
},
$CommandLine[[Position[$CommandLine, "-script", 1][[1,1]] + 1]]
]
Program = ScriptName[];
Print["Program: " <> Program]