How can I run Mathematica in Batch Mode?
– You can use Mathematica in batch mode to perform large calculations with multiple lines of input. Following is the procedure: Create the input file containing mathematica commands using your favorite editor. At the UNIX Shell prompt, give the command: math -batchinput -batchoutput outfile where “infile” is the name of the Mathematica input file you have created and “outfile” is the name of file where Mathematica will write the output.