Given the following code in a Mathematica notebook named test.nb:
var = 3*Exp[t] - 4*t;
Export["test.txt", var];
I can make the files test.m and test.wls corresponding to test.nb.
However, I would like to obtain the output in test.txt by using the MAC terminal.
How can this be done?
I've tried the following:
wolframscript -file test.nb
and
/Applications/Mathematica12.app/Contents/MacOS/MathKernel -noprompt -run "<<test.m"
but neither approach yields output.
Thanks in advance for any help.