I want to run a short code like that in the linux command line
(*Set the work directory*) SetDirectory["/data0/PredinctModleFingerprint/Predict/CXT/20170703"]; (*Import the data source*) testdata = Import["test.csv"] // Flatten; plot = ListPlot[testdata]; Export["myplot.png", plot]
test.csv is a
csv file which is in the same directory with the script. the file just contain some numbers as follow.
1 2 3 4 5 6 7 8
now I want to import the file, and export the list plot named as myplot.png.
The code runs good in the Mathematica front-end Notebook on the windows platform . But I need to run this code in remote commands line. So I save this code from
test.m, and run the code as follow on the linux platform
MathematicaScript -script test.m
MathKernel -noprompt -initfile test.m
math -noprompt -script test.m
I get nothing.
then I save the .nb file as wolfram language package, and run
wolfram -script test.wl
but I still get noting.