Problem with Mathematica in batch mode.



I'm trying to run mathematica in batch mode on a UNIX box. If the output appears on two lines, as it does on occasions, the results are wrong. Any help appreciated.

The following puts a set of commands in the file foo, and writes the result to the file foobar, it works fine.

sparrow /tmp % echo "1+2" > foo
sparrow /tmp % math -batchinput -batchoutput < foo > foobar
sparrow /tmp % cat foobar
" Cannot initialize Motif graphics "

3


But here is an example of where it goes wrong. In this case the number has a power, which gets put on another line, which is not directed into the file.

sparrow /tmp % echo "10000000000000+2.043" > foo
sparrow /tmp % math -batchinput -batchoutput < foo > foobar
sparrow /tmp % more foobar
" Cannot initialize Motif graphics "

1.0000000000002043*^13

In this case, Mathematica would normally show 1.0000000000002043*10^13, but the "10" appears on the line above and so gets missed.


--
Dave K MCSE.

MCSE = Minefield Consultant and Solitaire Expert.

Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually.
.



Relevant Pages

  • Re: open failed: illegal insecure pathname
    ... Casper Dik wrote a bit of library code which I preloaded to change the ... Dave K MCSE. ... http://witm.sourceforge.net/ (Web based Mathematica front end) ...
    (comp.unix.solaris)
  • Re: Staroffice 8 very very slow
    ... I have tried to locate some support from SUN on their suport web but can't find any forum which is alive! ... I had a similar problem with the 3rd party program Mathematica on slower machines. ... I doubt it is the same issue, as Sun would have more likely noticed a problem with a program they produce than one produced by a 3rd party (Mathematica). ... Dave K MCSE. ...
    (comp.unix.solaris)
  • Re: Staroffice 8 very very slow
    ... That almost certainly means the issue is nothing to do with the one I had on Mathematica. ... The login environment I have is not changed! ... Dave K MCSE. ...
    (comp.unix.solaris)
  • Re: An example of Mathematica on a PDA
    ... John ffitch wrote: ... There have been a large amount of interest in accessing Mathematica from smart phones and PDAs, so I thought that might be useful to some. ... Dave K MCSE. ...
    (sci.math.symbolic)