Xic has a batch mode of operation, where Xic will start without graphics, run commands, and exit. Batch mode is signaled by giving the -B option in the command line, in one of the following forms:
-Bscriptfile[,param1=value1][,param2=value2]...
-B-command
In the first form, the path to a file containing Xic script statements immediately follows ``-B'' with no space. The statements in the script file will be executed after the first input file is loaded. If no input file is given on the command line, the script will be executed after the default ``noname'' cell is loaded.
It is possible to pass parameters to the batch-mode scripts from the command line. The comma is used as a delimiter. Commas in the line that remain in single or double quotes after the shell has treated the line are not taken as separators. The entire construct should not have any embedded white space, except when single or double quoted as part of the values.
The param1, param2, etc. are the names of variables that will be defined in the execution context of the script. These variables will be set to value1, value2, etc. The values are numbers, strings, or executable text. Values that contain white space must be quoted, but note that the shell will strip the quote marks, so that a string constant should be single and double quoted as shown below.
Example
xic -Bmyscript,p1=1.234,p2='"a string"',p3="p1 + 1"
This translates into the virtual addition of three lines to the beginning of the script:
p1 = 1.234
p2 = "a string"
p3 = p1 + 1
In the second form, the ``-B'' is immediately followed by another `-' and one of the command keywords listed below. After the first cell is loaded (or ``noname'' if no input file was named in the command line) the command will be executed. The recognized commands are listed below.
The .xicstart file is read and executed (if it exists) before the first cell is loaded, and all other initialization is performed in the normal sequence. The commands below are simple shortcuts to common operations. If non-default options are required, then these can either be set in a .xicinit or .xicstart file, or the first form of the -B option should be used.
In batch mode, the log files for reading and writing of files are written to the current directory.