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?
1 Answers
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.
- 4,088
- 7
- 20
wolframscriptis not a different product. It is a way to invoke the Mathematica kernel. You can run scripts withwolframscriptor withmath -scriptand there are some differences in behaviour. – Szabolcs Apr 30 '20 at 19:39math -script, but somehow my install doesn't havewolframscript, 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. – Daniel May 02 '20 at 14:39