Long time ago, when I was bachelor student, a huge amount of calculations for my thesis were checked (at first instance) in a not-so-clever way by running a Maple worksheet in bach-mode (background). Of course I don't remember how I did it, but I just learn how to do a similar thing using Mathematica.
- Open a Mathematica notebook, and write all the command lines of your calculation (or program or whatever you are interested on).
- Go to the Cell menu, Cell Properties and press Initialization Cell.
- Save it... Not as a notebook but rather as a Mathematica package. Make sure in the additional Options the box Only save Code cells is checked. At the end you must have your file.m wherever you saved it.
- Open a shell and go to the directory where you've saved the file.
- Type the instruction [> gedit file.m
- Edit the file as follows, after the line (*:: Package ::*) add the command line AppendTo[$Echo, "stdout"] and at the end of the file add the command Quit. Save the changes.
- Finally, back to the sheel just write [> math < file.m > output &
You can even logout your account and after enough time when you come back the result will be written in the file output which you can see in your favorite text editor.
Enjoy
Oscar.