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.

Community
  • 1
  • 1
Alexey Popkov
  • 9,355
  • 4
  • 42
  • 93
  • 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 wiki_ – Dr. belisarius Apr 24 '11 at 16:11
  • @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. – Alexey Popkov Apr 24 '11 at 16:54
  • 1
    In Spanish there is a meme that goes "Tiene razón, pero marche preso". Something like "You're right, but go to jail". – Dr. belisarius Apr 24 '11 at 17:02
  • @belisarius What do you think about edited version of my question? – Alexey Popkov Apr 24 '11 at 17:14
  • Better now. Let's see if it survives. – Dr. belisarius Apr 24 '11 at 17:20

1 Answers1

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.

Sasha
  • 5,935
  • 1
  • 25
  • 33
  • I just found what [MathLM](http://reference.wolfram.com/mathematica/ref/program/mathlm.html) is. – Alexey Popkov Apr 24 '11 at 13:21
  • @Sasha 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? – Alexey Popkov Apr 24 '11 at 17:05
  • @Alexey It can be anything, including `Get` of a large program. – Sasha Apr 24 '11 at 17:24
  • @Sasha I mean how long `cmd` can be itself? Are there any limitations? – Alexey Popkov Apr 24 '11 at 17:38
  • 1
    @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. – Sasha Apr 24 '11 at 18:00
  • 1
    I just found [in the Documentation](http://reference.wolfram.com/mathematica/ref/Run.html) an example of using `-run` command-line argument: `commandstring=First[$CommandLine]<>" -noprompt -run \"Put[Factorial[20],ToFileName[$TemporaryPrefix,ToString[temp1]]];Quit[]\"";Run[commandstring]` – Alexey Popkov Apr 25 '11 at 19:55