Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7156 > unrolled thread
| Started by | Patrick Scheibe <pscheibe@trm.uni-leipzig.de> |
|---|---|
| First post | 2011-12-13 10:39 +0000 |
| Last post | 2011-12-13 10:39 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: How to run ".nb" file always in dos command line Patrick Scheibe <pscheibe@trm.uni-leipzig.de> - 2011-12-13 10:39 +0000
| From | Patrick Scheibe <pscheibe@trm.uni-leipzig.de> |
|---|---|
| Date | 2011-12-13 10:39 +0000 |
| Subject | Re: How to run ".nb" file always in dos command line |
| Message-ID | <jc7a06$ojk$1@smc.vnet.net> |
Hi,
please go to Help->DocumentationCenter and paste
tutorial/MathematicaScripts
into the search line. You'll see that a file test.m containing this:
#!/usr/local/bin/MathematicaScript -script
Export["./test.png",Plot[Sin[x] ,{x, 0, 6 Pi}]];
will do what you want, when you set the file executable and call it like
a normal shell script with "./test.m" or you call
MathematicaScript -script test.m
If you are not on Linux, then you may have to adjust your paths, etc.
Cheers
Patrick
On Mon, 2011-12-12 at 06:41 -0500, wch wrote:
> Hi,everybody,I have met an problem when run mathematica in DOS
> interface. I will tell you this confuse:
> in "1.nb" file, I have written a sentence: Plot[Sin[x], {x, 0, 6 Pi}],
> then I run 1.nb in DOS command line with "> 1.nb", it will be opened
> in a moment.
> now I want to evaluate "1.nb" in DOS in order to generate the figure
> of Plot[Sin[x], {x, 0, 6 Pi}]. but I don't know how to send order to
> mathematica.
> In a word, I want to execute all process in DOS command not under
> notebook interface through "shift + enter". combination.
> Thank you for all the information in advance,I am wating for your
> coming.
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web