|
Vortex can be run from the command line, for running of a script
without a Web server or for maintenance scripts. The last argument is
usually either a script to run or a SQL command to execute.
The Vortex command line syntax is:
texis [options] [var=value] [var=value] [srcfile-or-SQL-command]
(The brackets ([]) indicate an optional part of the syntax.)
srcfile-or-SQL-command is either the full path of the Vortex
script to run, or a SQL command to execute on the database. Either
is required, unless a standalone action like -W is invoked.
If a script is named, it has the same syntax as the URL would have,
without the CGI program
(eg. /path[/+state][/function.mime][/+/userpath]). The
path is interpreted as an ordinary file, not relative to ScriptRoot
or document root. Note that running a script from the
command line may result in inaccurate URLs begin generated by the
$url and $urlroot variables, as the texis CGI
script path cannot be determined without the server.
Variables may be assigned on the command line for a script with the
var=value syntax. Both the var name and its value
should be URL-encoded (for portable command-line escapement).
Variable assignments may be intermixed with other options, but like
all options, must occur before the script name which is last on the
command line. Assigning the same variable multiple times gives it
multiple values, in command-line order.
If a SQL command is given, the database defaults to the current
directory, or the one named with -d is used. The result rows
are printed out, in either columns (the default) or one field per row
(if -c given). No Vortex variables may appear in the command;
any parameters must be given as literal (single-quoted) values.
-
-?
Print a help message. -
-d db
Use database db instead of the default/installed database
path. A run-time <DB> statement in a script will override
this. -
-u user
Login as the given Texis user. -
-p password
Login with the given password. -
var=value
Assign the URL-encoded value to var on startup.
Multiple assignment statements for the same variable will result
in multiple values for that variable. Vortex scripts only. -
-C
Compile script only; do not execute. -
-W
Wipe the state table (delete and re-create it). A srcfile
need not be given. Occasionally running texis with this
option when the server is inactive is recommended, as the state
table may grow large on heavily used servers. -
-M
Output the source file:line first in error messages. This is
useful in an editing/compilation environment such as Gnu
emacs that can parse this output and automatically go to
the source line of the error. -
-e file
Log errors to file instead of the default/installed log
file (/usr/local/morph3/texis/vortex.log). A -
(dash) means log to standard error. Errors are also printed in
the output, unless a putmsg function (p. )
is defined to catch them. -
-r
Run Vortex script. This is the default action, unless a SQL command
is given. -
-K pid [sig]
Kill Texis process pid. An optional signal sig
(name or value) may be given; the default is SIGTERM,
which is a safer way to terminate a Vortex script (especially
under Windows) than SIGKILL or Task Manager's End Process
button. Added in version 5.01.1172007224 20070220. -
-license
Print current license statistics. -
-s
Execute SQL statement. The remaining options only apply to SQL
statements: -
-h
Don't print column headings in the output. -
-v
Verbose: display inserted/updated/deleted rows also; by default
only rows from select statements are shown. -
-c
Format one field per line in the output. Normally all fields from a
row are output on the same line. -
-w width
Make field headings width characters wide. A value of 0
means align to the longest field name. -
-l rows
Limit output to the given number of rows. -
-m
Create the database named with -d. -
-tracesql [n]
Debugging: print informational, <putmsg>-capturable
messages giving the exact SQL statements executed and their
parameters. This is useful when debugging a complex script that
constructs its SQL statements on the fly from various sources.
Added in version 2.6.936400000 19990903. See also the
sqlcp function (p. ) and the
<TRACESQL> directive (p. ).
Specify multiple times for increased verbosity; in version
3.01.980200000 20010122 and later, an optional numeric argument
n may be given instead. -
-tracedns [n], -traceskt [n], -traceidx [n]
Debugging: trace DNS, socket, or Metamorph index calls. Use
multiple times for increased verbosity. Unsupported/internal use.
See also the sqlcp and urlcp (p. )
functions. Added in version 3.0.948700000 20000124. -
-tracekdbf [n|file]
Debugging: trace KDBF calls. Takes an optional numeric or file
argument. Unsupported/internal use.
Added in version 3.01.983500000 20010301. -
-tracealarm n
Debugging: trace alarm calls. Unsupported/internal use.
Added in version 5.01.1106770783 20050126. -
-tracepipe n
Debugging: trace pipe calls. Unsupported/internal use. -
-tracelib n
Debugging: trace shared lib calls. Flags subject to change in a
future release. Currently defined values (bit-wise ORed):
-
0x1: Trace libpath expansion -
0x2: Trace library search and loading -
0x4: Trace symbol lookup
Added in version 5.01.1215040000 20080702. -
-conf file
Deprecated option; use --texis-conf=file instead.
Added in version 3.01.979600000 20010115. -
--texis-conf=file
Use alternate Texis configuration file instead of
texis.cnf in the install directory. Added in
version 5.01.1145307295 20060417. -
--install-dir=dir
Use alternate Texis install dir instead of
default or install-time-configured directory
(eg. /usr/local/morph3 or c:\morph3). Added in version
5.01.1145307295 20060417. -
--install-dir-force=dir
Same as --install-dir=dir, but try to use dir even
if it does not exist. Added in version 5.01.1145307295 20060417. -
--ignore-env-script-name=value,...
Override texis.cnf setting [Texis] Ignore Env Script
Name (p. ). Usually the
texis.cnf setting is enough, but this command-line override
can be used (eg. in the web server config) if multiple CGI
environments are in simultaneous use and the setting must differ
between them. Note that it will be ignored in CGI mode (like all
command line options) unless permitted via [Texis] Allow Cgi
Command Line Options (p. ).
Added in version 5.01.1182304953 20070619. -
-mkwebinator
Create Webinator tables and indexes. Unsupported/internal use. Added
in version 3.01.994500000 20010706. -
--
Indicates end of options, ie. what follows (if anything) is the
script or SQL statement. Added in version 5.01.1182193063 20070618.
There are also several options associated with Vortex modules
(p. ) and scheduling
(p. ).
Copyright © Thunderstone Software Last updated: Wed Sep 10 11:16:28 EDT 2008
|