Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Running MathematicaScript in Mac Terminal
Replies: 3   Last Post: Feb 15, 2012 4:48 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Patrick Scheibe

Posts: 327
Registered: 5/22/07
Re: Running MathematicaScript in Mac Terminal
Posted: Feb 15, 2012 4:45 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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
>






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.