runs Scilab in interactive or batch mode with command line options
scilab <Options>
The list of Scilab launching options -- including options for developers --
can be displayed in the OS terminal through the --help
option.
unix_w(SCI+"/bin/scilab --help 2>&1") | ![]() | ![]() |
--> unix_w(SCI+"/bin/scilab --help 2>&1") Usage: Scilab <options> -args arg1 arg2..: Send directly some arg1 arg2 .. data to the session. arg1 arg2 .. values can then be read through sciargs(). -e Instruction : Execute the scilab instruction given in Instruction argument. -e and -f arguments are mutually exclusive. -f File : Execute the scilab script given in File argument. -e and -f arguments are mutually exclusive. -quit : force scilab exit after execution of script from -e or -f argument. Flag ignored if it is not used with -e or -f argument. -l lang : Change the language of scilab (default : en_US). -nw : Enable console mode. -nwni : Enable terminal mode. -ns : Do not execute etc/scilab.start. -nouserstartup : Do not execute user startup files (SCIHOME/scilab.ini|.scilab). -noatomsautoload : Do not autoload eligible ATOMS modules. -nb : Do not display the banner (no banner). -scihome <dir> : Force SCIHOME to <dir>. -texmacs : Option to use Scilab from documents through http://texmacs.org. -version : Display the Scilab version (no session opened). -display Display : Set the display to the X server Display (XWindow systems only). unix:0.0 is the default. --help : Display this help. Developer Trace arguments: --parse-trace : Display bison state machine evolution. --AST-trace : Display ASCII-art AST to be human readable. --pretty-print : Display pretty-printed code, standard Scilab syntax. Developer Timer arguments: --AST-timed : Time each AST node. --timed : Time global execution. Developer Debug arguments: --no-exec : Only do Lexing/parsing do not execute instructions. --context-dump : Display context status. --exec-verbose : Display command before running it. --timeout delay : Kill the Scilab process after a delay.
They are described below.
This option allows to send some data to the Scilab session:
\"
instead of "
.'
is a regular character. It has no special meaning.Inside the opened session, these data can be retrieved as separated strings with sciargs().
Example:
C:\Users\Me> C:\SCIdir\bin\scilab -nw -nb -noatomsautoload -args "Hello %USERNAME%" 1.2345 \"%cd%\"
// Inside the opened session: a = sciargs() i = find(a=="-args") a(i+1) evstr(a(i+2))*2 "This session has been launched from " + a(i+3) | ![]() | ![]() |
--> // Inside the opened session: --> a = sciargs() a = ! c:\SCIdir\bin\WScilex-cli.exe ! ! -nb ! ! -noatomsautoload ! ! -args ! ! Hello John ! ! 1.2345 ! ! "C:\Users\Me" ! --> i = find(a=="-args") i = 5. --> a(i+1) ans = Hello John --> evstr(a(i+2))*2 ans = 2.469 --> "This session has been launched from " + a(i+3) ans = This session has been launched from "C:\Users\Me"
Note here that >scilab -nw
has been translated into
Wscilex-cli.exe
by the scilab
batch file,
in such a way that the "-nw" option is not returned by sciargs()
(see further below).
![]() | Using -args as the last
command line option is safer. |
For use under Xwindow systems only to set a specific X server display. Default display is unix:0.0.
-display
can be abbreviated by -d
.
At the end of the whole session startup, this option
sets the current working directory to the shell directory
from which Scilab has been launched. Please see the example
given here-below for the -f
option. Then,
executes Scilab Instructions
provided
in a string. Example:
OS> scilab -nw -e "disp(\"Hello\"); a=%pi+%i; disp(exp(a)); exit;" -nb
![]() | -e and -f options can't be used together. |
If this option is used, then at the beginning of the Scilab session, after the execution of the scilab and user startup files, and after the setting of user Preferences -- including the working directory ones --,
the current Scilab working directory is set to the shell directory from which Scilab has been launched. For instance,
D:\users\me\scilab\dev> C:\SCIdir\bin\scilab -f ..\test.sce
cd("D:\users\me\scilab\dev")
.the Scilab script file
is executed.
If a relative path is used (default .\
,
or like ..\
in the sample here-above),
it refers to the new Scilab working directory.
A file with .xcos extension will be opened by Xcos.
This option forces scilab to always exit after the instruction(s) passed
with the -e
option, or the script referred to by the
-f
option, have been executed, even in case of a runtime
error. This option should always be used in batch mode.
It is ignored if neither -e
nor -f
options are present.
If this option is present, it sets the user language. lang can be: ca_ES de_DE en_US es_ES fr_FR ja_JP pt_BR ru_RU zh_CN zh_TW.
For compatibility reasons, other possible lang
values
are 'fr'
for french, 'en'
for
English, or 'pt'
for Brasilian Portuguese.
The default language is English.
![]() | On Windows, in "-nw" or "-nwni" modes, the selected font of the terminal
must be a TrueType one to support UTF-8 characters, like
Monospaced (best choice if available) or
Consolas or Lucida Console.. |
On some systems, locales must be compiled to render correctly UTF-8 fonts.
"no banner": Cancels the display of the Scilab's loading message.
"No Startup files": Cancels the execution of the main startup file
SCI/etc/scilab.start
and of the user startup files
SCIHOME/.scilab
,
SCIHOME/scilab.ini
.
This option will disable many features in Scilab. Please use it only if you know what you are doing.
Cancels the execution of the user startup files
SCIHOME/.scilab
and
SCIHOME/scilab.ini
.
Cancels the autoloading of installed ATOMS modules at startup.
If this option is present, Scilab is started as command line with advanced features still available (graphics, export, xcos, scinotes, help browser, ...).
pipes are enabled for all operating systems. See the examples for further details.
The actual Scilab binary file executed when using the "-nw" option is
WScilex-cli.exe
.scilab-adv-cli
(Scilab Advanced Command Line Interpreter).![]() | This mode prevents loading the Java Virtual Machine.
It starts faster and uses less memory. But then... |
![]() | Scilab is started as command line interpreter without any advanced features
requiring the JVM: graphics, export, xcos, scinotes, help browser, other
java interfaces, the Java module,... are not available. |
Anyway, pipes are enabled for all operating systems. See the examples for further details.
Dedicated executable files performing the -nwni
mode are
provided:
Scilex.exe
.scilab-cli
(Scilab Command Line Interpreter).Forces SCIHOME to the dir
directory. If the path
includes some white space, it must be specified between
double-quotes (no single quotes!).
if dir
is a relative path, dir
is added to the parent standard SCIHOME folder.
On Windows: | %USERPROFILE%\AppData\Roaming\Scilab\dir |
On Linux/MacOS: | ~/.Scilab/dir |
This option is used when Scilab is used as computational interface
within the TeXmacs scientific editor,
using the TeXmacs
ATOMS module.
This one can be priorly installed in Scilab with atomsInstall('texmacs')
.
Only displays the Scilab's version in the OS terminal, without launching any Scilab session.
Advice: use theses options on a Scilab source tree.
Start Scilab under the debugger gdb.
The variable SCILAB_GDB_OPT
may be set to add custom options to gdb.
Start Scilab under rr.
Start Scilab under kdbg.
Start Scilab under valgrind.
The variable SCILAB_VALGRIND_OPT may be set to add custom options to valgrind (and override the existing valgrind options).
Start Scilab under callgrind.
The variable SCILAB_VALGRIND_OPT may be set to add custom options to callgrind (and override the existing callgrind options).
Start Scilab with the Electric Fence.
If this variable is present, Scilab startup script will show a startup debug information. Mainly used for bug report and debugging purposes.
Specify which Java to use. For example,
JAVA_HOME=/usr/lib/jvm/java-7-openjdk/ scilab
will start Scilab with Java 7.
Disable Tk (but not Tcl) features.
Enable Java Headless VM (i.e. without GUI features).
![]() | The options described here-below are useless and are cancelled if the option -nwni is used. |
Starting from Scilab 5.0, the graphical user interface (GUI) and the build documentation are based on Java features. In some cases, it can be important to edit the JVM options (Java Virtual Machine).
These options are available in the SCI/etc/jvm_options.xml file. The three following options are easily accessible in this file:
This option set the amount of memory available by the Java Virtual Machine. By default, 256M are allocated. If you change this value, check that the value does not exceed the memory available on the system.
This value can be changed in the preferences menu.
This option with the argument JIT enables the Java Just In Time compiler. It is activated by default. NONE disables the JIT and decreases dramatically performances.
These options enable more checks and output from the JNI calls. These options are useful in case of debugging and are disabled by default since they decreases performances.
Many more options are available. They can improve the performances, change look and feel, change memory managements... See: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html.
# Let's start Scilab in profiling mode without attaching a gdb once a SIGSEGV is met. # We are under Bash shell export SCILAB_VALGRIND_OPT="--db-attach=no --log-file=myfile.txt" scilab -profiling # Let's start Scilab in debug mode without stopping after each SIGSEGV # First, we write a small command file echo "handle SIGSEGV nostop" > debug.txt # Now set the custom option # We are under Bash shell export SCILAB_GDB_OPT="--command=debug.txt" # Start Scilab in debug mode scilab -debug
# Under GNU/Linux, Mac OS X or Unix: $ echo "disp(%pi)" | scilab-cli or $ echo "disp(%pi)" | scilab -nwni # Only open the Scilab help window: $ scilab-adv-cli -e "help()" or $ scilab -nw -e "help()" # Scilab can be used for scripting aspects: echo "if 1<>2 then exit(99) end"|scilab-cli echo $?
Version | Description |
5.2.0 | Piping is enabled. Option -l lang added |
5.4.0 | -noatomsautoload added. The Java Heap memory can be set through the preferences. |
5.4.1 | scinotes and xcos individual scripts introduced. See SEP #87. |
6.0.0 |
|
6.0.1 |
On Windows, a new |