Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: Running MathematicaScript in Mac Terminal
Posted:
Feb 15, 2012 4:45 AM
|
|
Hi Murta,
the doc is wrong. On my OSX-systems there is no symbolic link in those directories either. I assume you have installed Mathematica under /Applications? To make your script work, you only have to find where MathematicaScript is located. Open a terminal and do the following:
find /Applications -name "MathematicaScript"
This should return the path which you can replace in your script.m. Here the working script looks then like
#!/Applications/Develop/Mathematica.app/Contents/MacOS/MathematicaScript-script
Print /@ RandomVariate[MixtureDistribution[ {1,2}, {NormalDistribution[1,2/10], NormalDistribution[3,1/10]}], 10, WorkingPrecision -> 50]
Cheers Patrick
On Feb 14, 2012, at 12:40 PM, Murta wrote:
> Hi All > I use Mathematica 8 Home edition and I'm testing running Script via > Shell in my MacOS. > I followed the tutorial, changed the permission using chmod a+x > script.m but it doesn't worked. > > the script is this (copy and paste the tutorial) > > ------------------------------------------------ > #!/usr/local/bin/MathematicaScript -script > > Print /@ RandomVariate[MixtureDistribution[ > {1,2}, > {NormalDistribution[1,2/10], > NormalDistribution[3,1/10]}], > 10, WorkingPrecision -> 50] > ------------------------------------------------ > I didn't find the MathematicaScript file that the tutorial says it's > in #!/usr/local/bin/MathematicaScript > maybe it could be de problem. > > my directory has: > > /usr/local/bin>ls > capinfos dvipdf flac mergecap pgpdisk pkill.pl text2pcap > twfind > dftest edit idl2wrs metaflac pgpwde randpkt tshark > wget > dumpcap editcap latex pdf2ps pgrep.pl rawshark twdiff > wireshark > > What I'm doing wrong? > tks in advance! > Murta >
|
|
|
|