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

MathGroup Archive 2011

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

Search the Archive

Re: MathKernel -script in MacOSX

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116336] Re: MathKernel -script in MacOSX
  • From: Armand Tamzarian <mike.honeychurch at gmail.com>
  • Date: Fri, 11 Feb 2011 04:16:16 -0500 (EST)
  • References: <ij0e7t$9cg$1@smc.vnet.net>

On Feb 10, 9:21 pm, "quen... at nandor.net" <cdani... at nandor.net> wrote:
> I am using Mathematica Home Edition 8.0 on Mac OSX.
> I am attempting to use 'MathKernel -script file.m' to evaluate a script,
> but have been unsuccessful.
>
> file.m is a text file containing: 2 + 2
>
> 'MathKernel -script file.m' fails to produce any output or a failure
> message.
>
> I have tried this under the standard Terminal application as well as X11
> with the same result. On the other hand,
>
> 'cat file.m | MathKernel -noprompt ' outputs '4' as expected.
>
> Moreover, 'MathKernel', with no options generates a Mathematica Shell as
> expected.
>
> Not sure what I am missing.
>
> Thanks,
>
> Bryan

I don't use the terminal directly but call it in applescripts where
the following works

do shell script "/Applications/Mathematica.app/Contents/MacOS/
MathKernel -run "<</path/to/script file.m""

Mike


  • Prev by Date: ButtonFunction for grid of custom Buttons
  • Next by Date: Re: Integrate this how?
  • Previous by thread: MathKernel -script in MacOSX
  • Next by thread: Applying function only if the output is positive