f



running mathematica from command line

Hi All,

I am trying to run mathematica from the command line with the following statements on my mac:

1) mathematica has no problem with the statement below

/Applications/Mathematica.app/Contents/MacOS/MathKernel -noprompt -initfile test.m 

2) however, mathematica automatically quit the program as soon as I execute the following command.

nohup nice /Applications/Mathematica.app/Contents/MacOS/MathKernel -noprompt -initfile test.m > output.out &

I was wondering if there is a special command to run under the Mac.

Please help.

Thanks

0
6/14/2013 8:53:40 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

0 Replies
917 Views

Similar Articles

[PageSpeed] 58

Reply:

Similar Artilces:

How to run Mathematica nb file in command line in windows?
How to run Mathematica nb file in command line in windows? For example, you can autorun a file.nb after double click a .bat file in windows I can not handle it well. Thanks On Sep 19, 2:38 am, timedcy <time...@gmail.com> wrote: > How to run Mathematica nb file in command line in windows? > For example, you can autorun a file.nb after double click a .bat file > in windows > I can not handle it well. > Thanks "C:\Program Files\Wolfram Research\Mathematica\7.0\Mathematica.exe" G: \data\birthday.nb "C" would be the drive where your programs are stored, it might be different if you have Mathematica installed somewhere other than its default installation. You need the quotes because of the spaces in the pathing to the executable file. G:\data\birthday.nb is the path and file name you want the executable to open. If this is not clear please contact me directly and I can explain in greater detail. Steven Shippee Olympia, Washington On 20 Sep, 10:41, shippee <slship...@gmail.com> wrote: > On Sep 19, 2:38 am, timedcy <time...@gmail.com> wrote: > > > How to run Mathematica nb file in command line in windows? > > For example, you can autorun a file.nb after double click a .bat file > > in windows > > I can not handle it well. > > Thanks > > "C:\Program Files\Wolfram Research\Mathematica\7.0\Mathematica.exe" G: > \data\birthday.nb &...

Running two silmultaneous instances of mathematica using a command line
We have Mathematica 5.0 for Windows running a real-time SPC manufacturing application. We can manually set two notebooks to run simultaneously in two separate instances of Mathematica. However, we would like to programmatically set up Mathematica so that an in-house scheduler program shutdowns and starts both Mathematica processes when any out-of-our-control situation occurs. When running our non-Mathematica scheduler, if we send to execute "Mathematica.exe first.nb" the application starts running first.nb successfully. If we send the second notebook to execute ("...

how to run a shell command in mathematica?
Hi, I want to change some file's mode such as "chmod a+x some-file" in mathematica, what should i do? thx! Type in the following command in your Mathematica notebook Run["chmod a+x some-file"] Type in the following command in your Mathematica notebook Run["chmod a+x some-file"] ...

Mathematica, MacOS-X, Command-line
I am trying to use Mathematica v5.2 on the command-line, and I get an error message i don't understand : $ /Applications/Mathematica\ 5.2.app/Contents/MacOS/MathKernel Mathematica 5.2 for Mac OS X x86 (32-bit) Copyright 1988-2006 Wolfram Research, Inc. Get::noopen: -- Message text not found -- ( /SystemFiles/CharacterEncodings/UTF-8.m) Get::noopen: -- Message text not found -- ( /SystemFiles/CharacterEncodings/MacintoshRoman.m) Get::noopen: -- Message text not found -- ( /SystemFiles/CharacterEncodings/UTF-8.m) General::stop: -- Message text not found -- (Get::noop...

how to run a command line command
lo there all i have an app that i want to launch an application from. i use linux with a bash shell. If i want to launch a program from my terminal, i use /myprogram or /home/myuser/myprogram how could i do something like this from a ruby script ? thanks sk On Mar 5, 12:22 pm, "shawn bright" <neph...@gmail.com> wrote: > lo there all > i have an app that i want to launch an application from. > i use linux with a bash shell. If i want to launch a program from my > terminal, i use > /myprogram > or /home/myuser/myprogram > > how could i do something l...

after install mathematica in archlinux .i can not run math or
The last step, I choose register later. Then I can not run math or mathematica. it says bad command or filename. How to do with it? thanks On Sep 6, 12:07 am, ww <huxiaopengs...@gmail.com> wrote: > The last step, I choose register later. > Then I can not run math or mathematica. it says bad command or > filename. > > How to do with it? > thanks It sounds like your path does not include the directory in which you installed Mathematica. Did you get any errors when installing? What version of Mathematica is it? You might try to install it again. Call ...

multiple files in command line arguments or adding command line arguments to a running application
Hi, &nbsp; I want to be able to open more than one data file in my stand-alone labview application. I can open one file by using cmdarg variable just fine. I want to be able to either a) have multiple files in the cmdarg variable (I can parse them if they are appended into one string, but now windows is just giving me one file that i clicked even though I may have 3 of them selected in explorer) or b) add files one at a&nbsp;time by clicking them, but I want these files to be going to the same labview application (to be appended to the cmdarg?), not starting a new copy of the Labview...

math =!= mathematica
Does somebody know why I get different behaviour for the following commands in a commandline session of mathematica 7 or inside a notebook? It also seems to be different in different Mathematica versions for the notebook format. See http://www.risc.jku.at/people/hemmecke/mathematica/ for the notebook files for Mathematica 5.2, 6.0, 7.0. Can someone explain the General::dupsym: The symbol Array with context A` already exists. message? Why does that message appear at all? If A`Array exists, then Mathematica should just use it, shouldn't it? According to http://reference.wol...

running command line commands with arguments...
Dear forum, I need to run a command line like command with arguments in the java code. Now I have things stored in a .bat file that I execute , however, I would like to run everything from the java code itself. Would that be possible? java code: Runtime r = Runtime.getRuntime(); try { String s = "latTest.bat"; r.exec(s); } catch (Exception ioe) {} bat file: @ECHO OFF cd c:\Program files\MikTex 2.5 pdflatex C:\Temp\testfile.tex testfile.pdf On 15 Feb 2007 23:19:31 -0800, doneirik wrote: > I need to r...

How to run commands in command line from a script
I know there is an easy way to do this, and I just can not remember. I have already searched where I thought the module would be. . . I just want to run some name specific commands. Is this easily possible? Thanks, -Ivan _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ The code module, perhaps? http://www.python.org/doc/2.4.1/lib/module-code.html ...

How to generate ``nice'' algebra output from command-line mathematica?
I have a .m file that I am running mathematica on the command line (using a linux cluster, qsub, and piping the output to a file). The generated algebra gets extremely complicated. I would love to be able to see the output formatted in a familiar mathematica form (e.g. with the lambda symbol instead of \[Lambda], integrals, etc.). Are there any tricks to generate a mathematica workbook or something equivalent that I can read after my job is complete? If necessary, I don't mind choosing some of the algebraic expressions and saving to a binary file at the end rather than having the whole session stored. I don't need to resulting file to be an interactive workbook, so if there is some way to generate Latex or some static output, then I would be happy with that approach. Thanks, Jesse On Wednesday, April 4, 2012 4:31:31 AM UTC-4, Jesse Perla wrote: > Are there any tricks to generate a mathematica workbook or something > equivalent that I can read after my job is complete? If necessary, I > don't mind choosing some of the algebraic expressions and saving to a > binary file at the end rather than having the whole session stored. I It appears that I can use the command to dump all globally scoped variables: DumpSave["test_save.mx", "Global`"] and then load it up after execution with: << test_save.mx; Is this the best way to do it? On 04/04/2012 09:31, Jesse Perla wrote: > I have a ....

Re: How to generate report with Mathematica script from command line (no front end) #2
Hi James I have the same problem. By what I know, it's not possible to generate pdf using the kernel without front end... Let me know if you get it! Tks Murta On Sep 6, 5:05 am, james rund <janju...@googlemail.com> wrote: > Hi, > first of all: am overwhelmed by the loads of useful tricks on this mailing list! > > Now, my current problem is the following, perhaps you can help: > I want to use Mathematica to make pretty reports of our data analysis. > I have a mathematica notebook that will load data from a specified file and generate a PDF and CDF acco...

Running command line commands in java program
We are trying to run a command line command, namely wget, in our java program. Is there a way to do something like 'wget http://www.cumtd.com'? ":)" <sadf@sadf.com> wrote: > We are trying to run a command line command, namely wget, in our java > program. Is there a way to do something like 'wget http://www.cumtd.com'? See the Runtime class (esp Runtime.exec(String command)) ":)" <sadf@sadf.com> wrote in message news:d0dc33$i85$1@news.ks.uiuc.edu... > We are trying to run a command line command, namely wget, in our java > program. Is there a way to do something like 'wget http://www.cumtd.com'? URLConnection con = new URL("http://www.cumtd.com").openConnection(); "If all you have is a hammer, everything looks like a nail" http://c2.com/cgi/wiki?GoldenHammer Don't be a victim. 99% of the time I've seen a system call or the use of JNI, it was for the wrong reason. -- Tony Morris http://xdweb.net/~dibblego/ I agree with the Runtime.exec method but it is not portable. Java's design was really built around the Unix model of processes, etc. and Windows command line programs are hindered by the lack of a true shell interpreter like Bash or the Korn Shell. Nonetheless, it is fairly simple to start a process up and monitor it's output. The difficulty I'm having is controlling external processes with Java. Perhaps this is asking to much of Runtime.exec. In any e...

[Mathematica 6] Sudden shutdown of Mathematica. No error messages, no traces, no warning. Mathematica just disappears from desktop
I've noticed this now more than one time. I would say this has happened to me about 5-6 times already since I started using Mathematica 6 which is about 2 weeks now. This is what happens: I'll be working on an open notebook, and do something, for example, just now, I went to do SAVE AS to save the notebook. Mathematica would just disappear in split second. No errors, nothing. I look and it is just gone. All windows gone. No traces. I have to restart Mathematica. And I just lost all my work for the last 30 minutes. Strange thing is now when I open the document sin...

Running a command line program and reading the result as it runs
Greetings all. I'm using Python 2.7 under Windows and am trying to run a command line program and process the programs output as it is running. A number of web searches have indicated that the following code would work. import subprocess p = subprocess.Popen("D:\Python\Python27\Scripts\pip.exe list -o", stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, universal_newlines=True, shell=False) for line in p.stdout: print line When I use this code I can see that the Popen works, any code between the Popen and the for will run straight away, but as soon as it gets to the for and tries to read p.stdout the code blocks until the command line program completes, then all of the lines are returned. Does anyone know how to get the results of the program without it blocking? Thanks, Ian Simcock. On Thu, Aug 22, 2013 at 3:51 PM, Ian Simcock <Ian.Simcock@internode.on.net> wrote: > When I use this code I can see that the Popen works, any code between the > Popen and the for will run straight away, but as soon as it gets to the for > and tries to read p.stdout the code blocks until the command line program > completes, then all of the lines are returned. > > Does anyone know how to get the results of the program without it blocking? Is the program actually producing output progressive...

Debugging Mathematica Code (Mathematica 7)
Hello Experts, I made my fist steps with the Mathematica (so called) debugger and stumbled immediately. Is there anywhrere a documentation of this tool that is worth it's name (a criterion which the Mathematica 7 documentatin on debug surely fails). I've tried a lot, but I'm still at the stage "trial an error". Greetings Mike "m.g." <mg@michaelgamer.de> wrote in message news:gl1okn$dpb$1@smc.vnet.net... > Hello Experts, > > I made my fist steps with the Mathematica (so called) debugger and > stumbled > immediate...

Wolfram reinvents Mathematica with Mathematica 6
Mathematica 6 is now available, introducing over 1,000 groundbreaking technologies developed over more than a decade at Wolfram Research. Mathematica 6 takes technical computing to a new level: more tightly bound, more natural, and more automated, applicable to a far wider range of areas than ever before. Central to this achievement is "instant interactivity"--taking models, computations, or just about any concept and turning them into fully interactive applications, sometimes within seconds. In addition to the new capabilities for instant development, Mathematica 6 is also optimiz...

JSpec command line run command doesn't work
Hi. I've just installed the JSpec* gem and trying to run some test suites. When I type: jspec run jspec run --browsers ff jspec run --browsers ff --server I receive the next warning and an error report: <gem_dir>/gems/visionmedia-commander-3.2.9/lib/commander/blank.rb:5: warning: undefining `object_id' may cause serious problem error: wrong number of arguments (1 for 0). Use --trace to view backtrace How can I fix the bug and what's the reason? OS: Debian 5.0.2 Ruby: 1.9.1 JSpec: 2.10.0 Firefox: 3.5.2 Thanks. * http://visionmedia.github.com/jspec/...

problems on mysql & hebrew
Hello. When I run the service : MySql, which points to same execution file, (I have changed the key on registry : \\HKLM\SYSTEM\ControlSet001\Services\MySql. The key : ImagePath. The value : "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe" --character-set-server=utf8 .... Is there other way and not to change directly on service ?) I got an error : Could not start the MySql service ... Error 1053 : The service did not respond to the start ... timely fashion. When I run the same line : "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe" --character-set-...

Running mathematica from terminal.
I have some problems with the mathematica code that I wrote. I'll try to explain. I used a ssh connection to work on a server pc in which mathematica is installed. First of all, my laptop is a macbook pro while the remote machine has a Debian distribution as operating system. My problem is that I obtained two different numerical results when I run my job with the graphical interface and with the terminal command (nohup math -script < filename.m> out.txt &). In more details, the result obtained when I run with the terminal command is not correct .Maybe, this problem is related t...

run all command line?
hello, i have generated a test harness with design verifier, so i have a model containing a signal builder with tests cases, and i can run one off them or all of them, but i'd like to do it by command line with a script, for now i can run one test case with the sim command but i can run them all. does someone as an idea? thanks jeff "jefff35 " <jefff35@hotmail.fr> wrote in message <hjjq4u$mog$1@fred.mathworks.com>... > hello, > i have generated a test harness with design verifier, so i have a model containing a signal builder with tests cases, and i ca...

Wolfram reinvents Mathematica with Mathematica 6 #2
Mathematica 6 is now available, introducing over 1,000 groundbreaking technologies developed over more than a decade at Wolfram Research. Mathematica 6 takes technical computing to a new level: more tightly bound, more natural, and more automated, applicable to a far wider range of areas than ever before. Central to this achievement is "instant interactivity"--taking models, computations, or just about any concept and turning them into fully interactive applications, sometimes within seconds. In addition to the new capabilities for instant development, Mathematica 6 is also optimized for the opposite end of the spectrum--infrastructure development--and everything in between. Key new features include: * Dynamic interactivity, allowing sophisticated interactive interfaces to be created from single lines of input * High-impact adaptive visualization for automated creation of high-fidelity function and data graphics * Language for data integration, including automatic integration of hundreds of standard data formats * Load-on-demand curated data for math, physics, chemistry, finance, geography, linguistics, and more * Symbolic interface construction for immediate creation of arbitrary interfaces from simple programs * Automated computational aesthetics, with algorithmic optimization for visual presentation Mathematica 6 is available for Windows NT/2000/XP/Vista, Mac OS X, Linux x86/Itanium, Solaris UltraSPARC/x86, HP-UX, IBM AIX, and compatible systems. For more i...

Re: math =!= mathematica
On 3/23/10 at 4:23 AM, hemmecke@gmail.com (hemmecke) wrote: >Does somebody know why I get different behaviour for the following >General::dupsym: The symbol Array with context A` already exists. >message? Why does that message appear at all? If A`Array exists, >then Mathematica should just use it, shouldn't it? >According to >http://reference.wolfram.com/mathematica/tutorial/Contexts.html we >have: >`name a symbol in the current context >So why is Mathematica complaining? The message is not telling you the symbol exists in the current cont...

opening notebooks in mathematica player instead of mathematica
When I double click on a notebook I want just want to view it. Is there a way to default the assigned application to open the mathematica notebooks with the mathematica viewer instead of having mathematica boot up? If I want mathematica to boot up I'll click on the icon. That's on my doc. I'm running Mac OS X 10.5.6 (9G55) on a PowerBook G4 if that helps any. On Mar 12, 2:21 am, Steven Matthew Anderson <AdAstr...@mac.com> wrote: > When I double click on a notebook I want just want to view it. Is ther= e a way to default the assigned application to open the mat...

Web resources about - running mathematica from command line - comp.soft-sys.math.mathematica

Philosophiæ Naturalis Principia Mathematica - Wikipedia, the free encyclopedia
The Principia states Newton's laws of motion , forming the foundation of classical mechanics , also Newton's law of universal gravitation , and ...

image processing - How do I find Waldo with Mathematica? - Stack Overflow
This was bugging me over the weekend: What is a good way to solve those Where's Waldo? [ 'Wally' outside of North America] puzzles, using Mathematica ...

Stephen Wolfram: The Background and Vision of Mathematica - YouTube
During the Wolfram Mathematica Virtual Conference 2011, Wolfram founder Stephen Wolfram shared the background and vision of Mathematica, including ...

Wolfram Mathematica coming to the iPad
It would appear that Wolfram, the company behind the Siri search engine is bringing its original product, Mathematica , to the iPad. In response ...

Premium Mathematica software free on budget Raspberry Pi
Wolfram Research is giving away its Mathematica software for use on the diminutive, $25 Raspberry Pi computers and debuting a brand-new programming ...

Stephen Wolfram: It was Steve Jobs who named 'Mathematica'
The creator of the answer engine in Siri writes about his long relationship with Jobs Wolfram. Photo: Creative Commons There are a several novel ...

700 New Functions In Wolfram Mathematica 10
Single biggest jump in new functionality in the software's history

New Wolfram Language Brings The Power Of Mathematica To Any Device
... is being expanded into a logic and knowledge engine that can operate locally or in the cloud. Wolfram Research's flagship program Mathematica ...

Mathematica and Wolfram On The Raspberry Pi
[Stephen Wolfram], possibly the only person on Earth who wants a second element named after him, is giving away Mathematica for the Raspberry ...

Wolfram Brings Mathematica Technical Computing to the Web
If you’re a fan of Wolfram’s Mathematica app, you’ll be pleased to hear its comprehensive tools for technical computing are now more accessible. ...

Resources last updated: 3/10/2016 12:13:22 PM