RosettaCodeData/Task/Program-name/Mathematica/program-name.math

13 lines
253 B
Plaintext

#!/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]