Command-line arguments of Mathematica Kernel and FrontEnd
Asked Answered
E

1

5

I still know nothing on usage of such command-line options of MathKernel as

-lmverbose
-run cmd
-password "pw"
-pwfile "file"

How are they working and what they are needed for?

Are there other potentially useful command-line options of the MathKernel and the FrontEnd?

P.S. Related answer.

Extent answered 24/4, 2011 at 12:39 Comment(5)
This question will be deleted sooner or later by other users as it is "not a real question". Much care have been used in the "Mathematica Toolbag" question to prevent that, and we will eventually move all of its contents to the tag wiki, if someone propose to close the question. I suggest you to edit the question there and add answers, instead of creating another post. Also, if you decide in contrary, please flag this question for moderation attention and ask to converted it to community wikiBiondo
@belisarius I think that the subject of this tread differs a bit from "Mathematica Toolbag" and that these threads should be separated. But you are much more experienced and I will do what you say.Extent
In Spanish there is a meme that goes "Tiene razón, pero marche preso". Something like "You're right, but go to jail".Biondo
@belisarius What do you think about edited version of my question?Extent
Better now. Let's see if it survives.Biondo
M
5

Please consult the following reference pages: MathKernel and Mathematica. Opening "More Information" section you will see documented options. Its says

-pwfile "file" ------- read passwords from file

-run cmd ----------- run cmd on startup

-lmverbose ------------ print information on interactions with MathLM


One can use -run option to execute certain commands before the first input, and it will not affect In/Out. Try MathKernel -run "a=1" and evaluate a on In1.

Margitmargo answered 24/4, 2011 at 13:3 Comment(6)
I just found what MathLM is.Extent
@Margitmargo Your addition about run eliminates ambiguity. I thought that this command just allows to run another program with path specified in cmd argument. But how large cmd is allowed to be?Extent
@Alexey It can be anything, including Get of a large program.Margitmargo
@Margitmargo I mean how long cmd can be itself? Are there any limitations?Extent
@Alexey I am unsure, but strongly suspect that the limitations are those of OS. On Linux, for instance, these can be multi-line and be of any length.Margitmargo
I just found in the Documentation an example of using -run command-line argument: commandstring=First[$CommandLine]<>" -noprompt -run \"Put[Factorial[20],ToFileName[$TemporaryPrefix,ToString[temp1]]];Quit[]\"";Run[commandstring]Extent

© 2022 - 2024 — McMap. All rights reserved.