RosettaCodeData/Task/Program-name/Mathematica/program-name.math
2023-07-01 13:44:08 -04:00

9 lines
250 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]