Questions tagged [command-line]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
545 views

How to run Mathematica source code in Linux command line when some external file need to be imported and the result need to export?

I want to run a short code like that in the linux command line ...
6
votes
1answer
262 views

How to recover WolframScript's former `-run` functionality?

With the 10.4 version of WolframScript, I could run something like ...
2
votes
1answer
63 views

call a zsh alias in the mathematica notebook

I want to call this zsh alias in a mathematica cell? my zsh alias is called testAlias I ...
2
votes
2answers
384 views

Parse command line arguments

I have been trying to parse command line arguments. There are a couple of types of options. 1. Mandatory 2. Optional 3. Alternative There are built-in/3rd ...
7
votes
1answer
400 views

curl in Mathematica, google link-shortener

I want to automatically get short links equivalents for things I CloudDeploy. I'd appreciate some tips on integrating command line workflow below into Mathematica ...
5
votes
0answers
43 views

List of symbols that do not work in console?

Symbols that do not work in the Wolfram Cloud have a nice "no cloud" icon. Is there something similar for symbols that don't work in the wolfram console? Or perhaps a full list of functions that do ...
9
votes
1answer
175 views

Textual progress in console?

Is there any way to get a textual progress bar (e.g. like the progressbar module in a python repl) when working in console mode? Anything would be better than this:
3
votes
1answer
269 views

How to run multiple scripts in a row from command line using the same kernel?

Here is my shell script so far (I am using MacOSX): ...
1
vote
2answers
85 views

Catch error messages in script mode

For debugging purposes, I wrote a function which should log the error message to a file. It does not work and I cannot see why this is the case. Here is the function: ...
1
vote
0answers
46 views

Different WordData results between notebook and command line

When I run p = WordData["classy", "PhoneticForm"]; Print[p]; Print[StringLength[p] ]; in a notebook, the result is ...
1
vote
1answer
125 views

Creating a CDF file from the command line?

I'm working remotely on the Wolfram Engine bundled with the Raspberry Pi and I want to export a manipulatable plot as a CDF without needing to have the front end open. So for example, the following ...
4
votes
1answer
565 views

Print without newline in command line mode

Does Mathematica provide any way to print text to the terminal without a newline at the end when running in command line mode? There are many workarounds with the notebook interface, but this ...
6
votes
2answers
346 views

Linux’s Bash shell in Windows 10 and mathematica

As we know, Linux’s Bash shell is coming to Windows 10. Now, I want to know, how to using Run[] command or other commands to run some commands like gfortran installed in Linux of Win10 ? And, is it ...
18
votes
1answer
1k views

Difference between “wolframscript -f” and “wolframscript -script”

In Mathematica 11, there is new wolframscript.exe According to help wolframscript.exe -h -f [ -file ] arg---------Run a ...
7
votes
2answers
748 views

How to view an image from command line?

I'm running mathematica in command line mode, but I need to view a graph/image, so I'd like to open an image with an X11 window to inspect an image: Is there an easy way or built-in command to to ...
5
votes
0answers
43 views

The second escaped path breaks command execution

Due to a terrible chain of events I had to reinstall part of my software. Git among it, but a newer version. Something changed because earlier all four evaluations were giving me a version info: <...
0
votes
0answers
69 views

Mathematica does't print the number 10 for small numbers on command line

I'm running this code from commanline using mathematica 10.1 #!/usr/local/bin/MathematicaScript -script vec = Table[10.0^-v,{v,0,10,1}]; Print[vec]; and the ...
5
votes
1answer
578 views

How to use shell commands inside mathematica

I want to know how to use simple shell commands inside mathematica. For example: I want to set the current directory as the NotebookDirectory using shell command PWD. Something like ...
15
votes
2answers
11k views

Running Mathematica Notebook files in command mode

The question is, how can I run a .nb file in the kernel mode of Mathematica? I am not an expert in Mathematica, but one of our users who use this program says that ...
7
votes
1answer
290 views

Determine how Mathematica was started

I have a notebook that I also execute as a m file on the command line. Depending on whether I run the notebook or the m file, I want to use slightly different commands. For example, ...
0
votes
1answer
86 views

Use the same Mathematica Executable Script on Different Computers

The first line in a Mathematica executable script specifies the directory of WolframScript, e.g. #!/usr/local/bin/WolframScript -script Assume I want to run a ...
7
votes
1answer
576 views

WolframScript Unix - Script Parameters on Raspberry Pi

I'm currently trying to run a script with 2 parameters which gets called via a BASH script. The script runs fine however the list of passed parameters , ...
3
votes
0answers
483 views

Interrupt evaluation of script with exit code 1 [closed]

I am running a Mathematica script I wrote as a batch job from a terminal, running it many times inside a loop inside a Bash script. Sometimes I want to abort the job. I can of course do ...
2
votes
1answer
746 views

Display line number/stack trace of error in script (i.e. batch mode / command line interface)

I am trying to set up a Mathematica script so that it runs from the command line in the manner that a sane person would expect. I have the following at the start of the file: ...
4
votes
0answers
156 views

Can one combine Mathematica with bash script?

For example, I create a Mathematica nb file which can work on a set of parameter values or several files at once. It needs me to change the parameter after finishing computing one parameter. If I ...
15
votes
1answer
995 views

Evaluating a notebook programmatically with -ne

I am running Mathematica 10.2 on an Ubuntu workstation. I would like to be able to evaluate a notebook through the command line, and save its final state so that I can launch evaluation remotely ...
1
vote
0answers
103 views

Running a script that needs a package

I am running a resource extensive notebook, and so I am trying to break it down into a .m file so that I can run it quicker and without using the mathematica interface. The problem is that my notebook ...
2
votes
1answer
140 views

Run example in Documentation not working in 10.2?

From Run's documentation ...
-1
votes
1answer
72 views

Remember Plotting Command [closed]

I used a command in another computer to obtain a surface without using any input more than the command. It returns me a surface like this: Anyone knows the command or commands that let me graph ...
5
votes
0answers
75 views

Can I customize the shell command line prompt?

Is there a way to customize the command line prompt (e.g., colorize it) for MathKernel when it runs as a shell command (in general, but specifically on OS X)?
3
votes
0answers
530 views

Difference between the CLI and the GUI version of Mathematica [closed]

I have been trying to find out how much faster Mathematica is in CLI than in GUI, and with lack of success in finding any information about it, I decided to crowdsource my quest for this piece of ...
5
votes
1answer
607 views

Can't run Bash scripts from within Mathematica 10.1

I am working on Debian 8 (Jessie) and Mathematica 10.1 (64-bit) Home Edition. I have created a script named curl_fetch.sh. It contains the line: ...
2
votes
0answers
31 views

How to make lines not wrapping in text-mode Mathematica? [duplicate]

When running Mathematica from Unix command line, i.e. pure text mode, the lines wrap at about 70 pr 80 characters, creating lots of visual clutter. How do I set it so that any outputs will not wrap ...
8
votes
1answer
242 views

Completion in terminal?

I know that it is possible to run Mathematica in Terminal. But I didn't find a way to get completion work in Terminal. I mean completion by ...
3
votes
0answers
252 views

Is there a way to profile Mathematica code in batch mode?

I'd like to profile some Mathematica code to figure out why it's running slowly. Since the code takes about a day to run, I can't use the Wolfram Workbench GUI. Is there a way to run Wolfram Workbench ...
7
votes
1answer
1k views

How to send OUT output to stdout when running a script from command line on widows?

I am learning how to run a Mathematica m file from command line. I am on windows. My question is: How to make the output display on the screen (the DOS windows) as the script is running? Currently, ...
1
vote
1answer
391 views

Can CDF player (or player pro) run command line tools?

I'm curious if you could distribute a command line tool to run as a CDF file? For example, distributing a command line tool that loads data from a database, transmogrifies it somehow, then writes it ...
6
votes
3answers
625 views

Running PowerShell commands in Mathematica

I'm trying to execute a PowerShell command using Mathematica. Someone has made it before? I tested my command direct in PowerShell, and it worked nice, but no idea on how can I make Mathematica to ...
0
votes
0answers
611 views

Running math file as batch job

I am trying to run the following Mathematica program, ...
2
votes
1answer
566 views

FullForm in Linux Command Line with -noprompt

I am looking for a way to get the output of FullForm in Command Line under Linux (Debian) using -noprompt argument. Example : What I have : a+b*c What I want : <...
2
votes
2answers
439 views

Exporting files while running .m file from command line

I have the following code in a .m file which is called test.m: Export["test.csv",0]; Exit[] I would like to run this .m file from the command line. I found that I can do that with the command "math -...
3
votes
1answer
2k views

Running Mathematica code from a command line

How can I schedule custom Mathematica code to run on my windows machine? I need to schedule some code to run on my computer (Windows, Mathematica 10.0). I'm trying to get something to run via a ...
15
votes
4answers
1k views

How to trigger UNIX command-line command from Mathematica notebook?

At UNIX command line, one can run ls -la $HOME. How to trigger this from Mathematica notebooks? Run["!ls -la $HOME"] ...
17
votes
3answers
9k views

Proper way to run a Mathematica script (-script vs -run vs MathematicaScript vs <)?

Suppose I have a Mathematica script called test.m. There at least 4 ways to run this from the terminal: ...
4
votes
1answer
3k views

Running a Mathematica Notebook from command line and saving the output [closed]

I am working on a project that requires some calculations to be done in Mathematica. I don't know Wolfram language and I don't have the time to learn it (I am using a 30-day trial) so I have a python ...
2
votes
2answers
307 views

ToExpression from commandline [duplicate]

I like to use Mathematica 8.0 from the commandline, then I just have to SSH in, no matter where I am, and go. I also like to do this without forwarding X, because that is slow and lags on my ...
2
votes
1answer
238 views

Changing Wolfram command line output into copyable text

I generated a long polynomial using the Wolfram command line, with divisions and exponents. But the divisions look like this: 4 - 5 And the exponents are on a ...
1
vote
1answer
1k views

Mathematica on a cluster

I try to run mathematica on a grid. Since this is my first time working on a cluster, I have no plan what to do. I have to run a job (pbs-file). ...
8
votes
3answers
627 views

Keep kernel running for execution of scheduled task

How can I keep a kernel running until all scheduled tasks have completed? For example upon running the following script bazinga.m: ...
3
votes
2answers
497 views

Under OS X, is there a way to view graphics output when running in the command line?

Being a long time unix shell person, I prefer Mathematica's command line interface, over the notebook. (command history, etc...) It just learned that on OS X, the cli is available as MathKernel. ...