Tips (Utility, Computer Language, and etc.)
[mathematica] command에서 script 실행하기
Struggler J.
2018. 10. 18. 03:16
함수로 만들어서 .bashrc에 넣어두었다.
1. 커맨드에서 커널로 돌리기
math(){
/Applications/Mathematica.app/Contents/MacOS/MathKernel -script $1.m
}
2. 실행파일로 만들어서 돌리기
mathc(){
echo "#!/Applications/Mathematica.app/Contents/MacOS/wolframscript" > $1.temp;
cat $1.m >> $1.temp
cat $1.temp > $1
rm -fr $1.temp
chmod a+x $1
}