I have a very basic question. I have a shell file test.sh that prints let's say Yeah
to a file called output.txt
:
#!/bin/sh
echo "Yeah" > output.txt
I am running the Run
command from the notebook:
Run["sh test.sh"]
But it is not creating the file output.txt
. Can anyone tell me please what is going wrong?
Run["sh test.sh"]
I get an output 0, and theoutput.txt
shows up in the same directory. $\endgroup$Directory[]
? Perhaps theoutput.txt
file is going somewhere in Mathematica's path? $\endgroup$SetDirectory[]
. I actually have a line in my/home/jason/.Mathematica/Kernel/init.m
file to saySetDirectory["~/Documents/Mathematica"];
so that I always start in that directory $\endgroup$