Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [command-line]

The tag has no usage guidance.

3
votes
0answers
38 views

Is there a limit to the amount of data that can be Run?

I need this command to work through the WolframKernel and it seems well beyond my understanding why it does not work above a certain amount of data size I'm passing to ...
2
votes
0answers
48 views

Not getting any output from mathematica script

I am completely new, so this question may be trivial, but I can't find any answers in the Wolfram documentation. I am playing around with scripting in Mathematica, but I cannot seem to get any type ...
5
votes
1answer
95 views

How to deal with compound command lines with RunProcess?

Given Windows DOS command input: tasklist|find /i "explorer.exe" How to pass it to ...
2
votes
0answers
51 views

Convert .nb to .m with a single script or command line in linux [duplicate]

I have some scripts in ".nb" format and I am more used to launch them in Linux command line in Linux but I need them in ".m" format. Usually I open the ".nb" script with the Mathematica Notebook and ...
0
votes
0answers
16 views

RunProcess Does not Stop

I want to convert a latex file to a pdf file, using Mathematica. To do that, I installed MikTex and the I can run the following command in cmd: lualatex main.txt ...
3
votes
0answers
50 views

Command line arguments to wolframscript interact strangely with -file option

In order to avoid script-defined command-line arguments clashing with existing arguments to wolframscript, it appears you are supposed to use the ...
10
votes
2answers
164 views

Any ergonomic tools for the command line kernel?

Mathematica on the command-line (invoked by running 'wolfram' on bash shell) seems bereft of all modern usability features. I'd like a list of the best third-party packages available (if any exist) ...
3
votes
0answers
42 views

Using an existing local kernel when launching from command line

I am trying to setup a web interface to a couple of Mathematica scripts, which in itself is quite simple: ...
3
votes
1answer
74 views

How to execute a Mathematica notebook in a shell script to produce plots/graphics [duplicate]

I want to produce some plots/graphics for a large amount of data on a computing cluster in a high-throughput way. I'd like to do this by piping results through Mathematica where I'd apply some post-...
5
votes
0answers
76 views

How can I create a REPL for Mathematica in Sublime Text

I would like to be able to interact with Mathematica command line interface from within Sublime Text. Sublime Text has a package called Sublime REPL that provides an interface for different ...
3
votes
1answer
135 views

How to activate Mathematica through remote license server from command line?

I am trying to activate Mathematica from the command line (I am logged remotely) by connecting to a remote network license server, but no success so far. I run the command ...
1
vote
0answers
43 views

Make exponents line up with their base in terminal

For some reason, the exponents displayed on a terminal (Mac OS X 10.13) Mathematica 11.2 do not line up with their bases: ...
0
votes
1answer
167 views

FindRoot fails 100 iteration precision

I am attempting to find roots of a complex equation that involves exponential functions and small approximation values. I have had success using FindRoot for values ...
3
votes
0answers
85 views

Passing UTF-8 to wolframscript on the command line

I am trying to use Unicode input to wolframscript -c, like so: $ ./wolframscript -c '1/∞' â^(-1) The source of this behavior ...
4
votes
0answers
57 views

Processor Detection Problem with Mathematica in Linux command-line

Here is the problem, there are two ways to launch Mathematica in Linux: Double click a notebook file in Desktop (GUI mode). It gives: $ProcessorCount (* 4 *) ...
2
votes
1answer
37 views

Echoing commands when running packages in batch mode

I run Mathematica packages in batch mode. I need a log file showing input commands and displaying their output. I tried these commands ...
0
votes
1answer
58 views

Loop command in Interpolation

I have a following interpolation function A[x,y] defined below. The variable y has some fixed range which is different for each <...
0
votes
0answers
68 views

How to plot imaginary parts of complex valued list of data separately?

I am using a user-defined function syscomplex[t1,t2,a] which calculates the complex energies of a system in a Mathematica-based software. Here: ...
2
votes
0answers
73 views

Export cdf does not work in MathKernel command line

I am using Mathematica through command line MathKernel. I am not trying to draw any graphics in the console. But I should be able to export things a CDF. Why can't ...
0
votes
0answers
214 views

math and mathematica not working in Debian command line

I am asking this question because I can't find solution anywhere. On the Mathematica website it says to start Mathematica type mathematica and to start the kernel ...
4
votes
1answer
121 views

Quit Mathematica kernel if no license available

I'm running the Mathematica kernel math from inside a makefile to generate C++ code, like so: ...
0
votes
1answer
73 views

Script not executed from command line on window

I have a simple test.m file: (*--- file test.m -------*) Print["Testing"] Integrate[Sin[x],x] (*---- end of file ------*) And I executed it in command line (...
2
votes
1answer
93 views

Print[] to console in Mathematica 11 [duplicate]

The Edit-> Preferences -> Evaluation menu is gone from Mathematica 11. But I want to redirect the output of Print with the option that used to be called Print[] ...
0
votes
2answers
104 views

How to get a right character when we use cmd command

This is my runtime environment $Version $CharacterEncoding "11.1.1 for Microsoft Windows (64-bit) (May 16, 2017)" "CP936" When I run ...
5
votes
1answer
52 views

Can we make preread replacements in an *.m* file before being run?

This the second question of (152743), the preamble of which is reproduced here: Those who don't have/prefer the front end of Mathematica will either use a plain ASCII editor to write a script in an ...
5
votes
1answer
45 views

Can we make new definitions for InputForm in packages?

Those who don't have/prefer the front end of Mathematica will either use a plain ASCII editor to write a script in an .m file or just use Mathematica directly from ...
4
votes
1answer
464 views

Problem calling Python scripts from Mathematica

so I'm running into a strange problem using Import[] to import the output of a python 3.6 script. I have a script my_script.py ...
1
vote
1answer
33 views

How to specify notebook's Saveable option from command line?

I've tried various ways to specify a notebook's Saveable option, all unsuccessful. For example, using an external editor, I edited ...
0
votes
0answers
303 views
5
votes
1answer
139 views

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

With the 10.4 version of WolframScript, I could run something like ...
2
votes
1answer
52 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
253 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 ...
6
votes
1answer
302 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
41 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 ...
6
votes
0answers
76 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
119 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
70 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
41 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
83 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
462 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
290 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 ...
15
votes
1answer
721 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
300 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
66 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
336 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 ...
12
votes
2answers
7k 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
278 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
79 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
477 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 , ...