MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: command line question


Hi Jason,

> Hi, I'm trying to execute Mathematica (5.2 on Windows) from 
> the command line via another program, but I'm having a hard 
> time finding a way that would just run a command, then exit.  
> Can this be done?
> Even if I could just read my argument from a file and write 
> it to another would be fine...just as long as it gives the 
> result, the exits.

It works ....

Open your favourite editor & type a whole series of commands.  Then run
Mathematica using

	math < inputFile.m > outputFile.out

For example, if test.m contains the two lines
	
	plt = Plot[x^2, {x, -2, 2}, DisplayFunction->Identity,
ImageSize->512];
	Export["test.eps", plt, "EPS"];

Then we can run the file from the command line using 

	math < test.m > test.out

And produce the files test.out & test.eps which contains the plot we
produced from the command line run.

Regards,

Dave.


  • Prev by Date: Problem connecting to ODBC database
  • Next by Date: Re: NDSolve with implicit function
  • Previous by thread: Re: command line question
  • Next by thread: NDSolve with implicit function