Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to pipe low-level notebook commands to work through terminal and I've tried various ways, but I can't really get to the frontend that's already open. For example Opening a notebook from command line in an existing front end instance this no longer works.

I've tried connecting to notebooks kernel, but it didn't work as I expected... perhaps I know too little.

I'd imagine it to work like this:

math -script file.m or mathematica file.m

Where file.m would contain commands to evaluate on currently opened notebooks in an existing mathematica instance. How should I approach it?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.