I have a simple test.m file:
(*--- file test.m -------*)
Print["Testing"]
Integrate[Sin[x],x]
(*---- end of file ------*)
And I executed it in command line (Windows 7 + Mathematica v11.0) like this:
C:\Program Files\Wolfram Research\Mathematica\11.0>math < c:\temp\test.m > c:\temp\output.txt
No output "Out[n]" was found in the output.txt:
The .m file is executed fine via the Mathematica Frontend.
Any advise please? Thanks!