6
$\begingroup$

It seems that both math and wolframscript can be used to run Mathematica scripts on the command line. Which one I should use, are they cross-compatible and what are the differences?

$\endgroup$
-1
$\begingroup$
math 

starts Mathematica as an application or in shell. This is the full application with all built-ins and loaded packages. Graphics and data types can be input and output.

wolframscript 

is a reduced modern innovative variant of Mathematica. The set of built-ins available are dependent on the monthly abonnement on the web platform web Mathematica in my case. wolframscript is independently licensed from Mathematica or other Wolfram Inc products.

For most younger, it is very important to get the knowledge from Wolfram Alpha to advance better and faster. Mathematica provides more built-ins. A good orientation provides the online web platform Web Mathematica some times web platform, wolfram online.

The most important difference is the missing notebook interface, help features, graphics are not displayed, no interactivity, the formatting of help like ? or Information is different. It is like the documentation provided with the used shell.

It works in shell of choice and has more kind of OS near functionality. It is a script version of Mathematica otherwise. Batch processing and calculation that run safely are a good choice in comparison to the Mathematica interface or the web platform. It has obviously the In-Out-concept that is common to Mathematica-based apps.

Wolframscript is free or cheaper for short time uses than Mathematica and therefore much more attractive for low budgets. concepts for code creating and management and storage are needed for both.

There are cases like the update to Catalina on MacOS where Wolframscript worked and Mathmatica needed to be updated to version 12 and 64bit in complete.

| improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ "innovative variant of Mathematica". Why is this innovative? I've seen reduced versions of flagship products released by other software developers. $\endgroup$ – QuantumDot Apr 30 at 19:37
  • 4
    $\begingroup$ Most of this description is incorrect and seems to refer to differences between Mathematica and the free Wolfram Engine (which does contain all the function which are available in Mathematica). wolframscript is not a different product. It is a way to invoke the Mathematica kernel. You can run scripts with wolframscript or with math -script and there are some differences in behaviour. $\endgroup$ – Szabolcs Apr 30 at 19:39
  • $\begingroup$ Thanks @Szabolcs and @user2432923. Indeed I was not referring to the free engine. I have found little documentation on scripts using math -script, but somehow my install doesn't have wolframscript, so in first instance, I was wondering if I could just substitute the commands. But also which one would be future-proof, more widely used etc. $\endgroup$ – Daniel May 2 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.