Quantcast
Channel: Active questions tagged string-manipulation - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 190

StringJoin fails in .m

$
0
0
Do[(  ND$T$thr[j] = j;  ND$T$thr[j] >> "test_" <> ToString[j] <> ".dat";  ), {j, 1, 3}]

This works without issue in a notebook and creates 3 files with different file names and different content. However, in a .m file that I run on ubuntu in the terminal with math -script test.m & this fails, with the error

StringJoin::string: String expected at postion 1 in Null<>1.dat.

Any ideas why and how to fix this?Thanks!


Viewing all articles
Browse latest Browse all 190

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>