Running Mathematica scripts directly from the Unix shell

1) Select cells with pretty expressions within the Mathematica Notebook and click Cell > Convert to > InputForm

2) Cut and paste the resulting inputform code into a textfile, e.g. script.m.

3) Repeat 1)-2) as needed.

4) Terminate textfile with:  Exit[]

5) Execute script from the command line prompt with:
~$ MathKernel -noprompt -run “<<script.m”