Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Running MathematicaScript in Mac Terminal

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124975] Re: Running MathematicaScript in Mac Terminal
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Wed, 15 Feb 2012 04:43:09 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201202141140.GAA17797@smc.vnet.net>

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
>




  • Prev by Date: Re: Running MathematicaScript in Mac Terminal
  • Next by Date: Re: simple question on DSolve
  • Previous by thread: Re: Running MathematicaScript in Mac Terminal
  • Next by thread: Re: Running MathematicaScript in Mac Terminal