As a test I want a simple script to take a command line argument and print it to a file:
Export["c://cygwin/home/jorgen/yu.dat",$ScriptCommandLine[],"Data"] // MatrixForm;
However when I run this with
./MathKernel -script Swargtest.m 45 the resulting file yu.dat looks like this:
I've tried what I could think of: making another variable with
out=$ScriptCommandLine[] and exporting that, removing the
$, running the script with
"45" on the command line, etc.
I'm using cygwin on a windows 7 machine.