TransWikia.com

Run .m file in terminal

Mathematica Asked on June 26, 2021

I have the following .m file

(* ::Package:: *)
(* ::Input:: *)
(*out=1+1;*)
(*Print["Test"];*)
(*Export["/path/test.txt",out];*)

and I am trying to run it in the terminal with
math -run -nomprompt < name.m

but it doesn’t work. I have changed the permissions of the .m file.

One Answer

Solution: They have to be initialization cells to be able to run them.

Answered by hal on June 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP