Thunderstone Software Document Retreival and Management
Search:
Advanced Search
Home | Products | Company | News | Tech Support | Demos | Contact Us
Search The Texis Manual for:
Search The Webscript Manual for:

SQL COMMANDS

ALTER USER
CREATE INDEX
CREATE TABLE
CREATE TABLE AS (ALTER TABLE)
CREATE USER
DELETE FROM
DROP INDEX
DROP TABLE
DROP USER
GRANT PERMISSIONS
INSERT INTO (new rows)
INSERT INTO (selected rows)
SELECT
UPDATE

SQL REFERENCE

Aggregate Functions
Column Aliasing
Document Similarity
Join Order
Literals
SQL functions.
Table Aliasing
Texis properties
WHERE vs. HAVING

TEXT QUERIES

An Overview
Approximate Patterns
Concept Searching
Keyword Search
Numeric Quantities
Phrase Searching
Proximity Range
Query Logic
Regular expressions

IMPORTING DATA

Timport

TEXIS WEBSCRIPT

<A>
<BREAK>
<CAPTURE>
<DB>
<EXEC>
<EXPORT>
<IF>, <ELSE>, <ELSEIF>
<LOCAL>
<LOOP>
<PUTMSG>
<READLN>
<RETURN>
<SCHEDULE>
<SQL>
<SQLCACHE>
<STACK>
<SWITCH>, <CASE>
<TIMEOUT>
<TIMPORT>
<TRACESQL>
<TRAP>
<USER>, <PASS>
<USES>
<VERB>
<WHILE>
<WRITE>
<abstract>
<adminsql>
<apicp>
<cal>
<caldate>
<calendar>
<checkbox>
<clist>
<code2geo>
<count>
<createdb>
<decrypt>
<encrypt>
<exit>
<fetch>
<flush>
<fmt>, <strfmt>
<geo2code>
<getpid>
<getvar>
<hash>
<header>
<kill>
<loadavg>
<loguser>
<lower>
<mm>
<nsinfo>
<nslookup>
<options>
<pdfxml>
<procexists>
<profiler>
<pwencrypt>
<radiobutton>
<rand>
<randpick>
<read>
<readvars>
<resetstats>
<rex>, <split>
<rmcommon>
<sandr>
<sb>
<send>
<setvar>
<sleep>
<slist>
<sort>
<spew>
<sqlcp>
<srand>
<stat>
<strcmp>, <strcmpi>
<strlen>
<strncmp>, <strnicmp>
<strrev>
<strstr>, <strstri>
<strtonum>
<submit>
<substr>
<sum>
<syscp>
<sysinfo>
<sysutil>
<uniq>
<uniqcount>
<upper>
<urlcp>
<urlinfo>
<urltext>, <urllinks>
<urlutil>
<userstats>
<varinfo>
<vxcp>
<vxinfo>
<wordlist>, <wordcount>
<xtree>
Special variables
Variable assignment

[more about: ] [^top^]

[more about: ] [^top^]

IMPORTING DATA


Timport is a general purpose import tool which can import a wide range of text formats, including comma separated, mail-messages, DBF format from PCs, as well as allowing custom formats to be specified.

timport -s <schema>  <datafiles>
[more about: Timport] [^top^]

SQL COMMANDS


ALTER USER user-name IDENTIFIED BY password

Changes user-name's password to password. You must be logged in as that user or _SYSTEM to perform this operation.

[more about: ALTER USER] [^top^]

CREATE [UNIQUE] | {[METAMORPH] [INVERTED | COUNTER]} INDEX index-name

  ON table-name

  (column-name1 [DESC]

  [, column-name2 [DESC] ] ...)
Index TypePurposeUpdated
(unspecified)A standard BTREE index used for fast lookup and orderingAutomatically as needed
UNIQUESame as BTREE but prevents replicated keys and records from to being insertedAutomatically as needed
INVERTEDUsed only for DATE fields, it allows rapid ORDER BY
Note: Be sure to create DESC if output is to be inverse chronological order
Automatically as needed
METAMORPHAn index for text retrieval speedOn re-issue of CREATE METAMORPH INDEX command
METAMORPH INVERTEDA larger METAMORPH index with additional speed for ranking and phrasesOn re-issue of CREATE METAMORPH INDEX command
METAMORPH COUNTERA METAMORPH index with additional information for LIKEIN queriesOn re-issue of CREATE METAMORPH INDEX command

See also: Virtual Fields

[more about: CREATE INDEX] [^top^]

CREATE TABLE table-name

  (column-name1 data-type 

  [, column-name2 data-type ] ...)
data-type description
BYTE(length) unsigned 8 bit fixed
VARBYTE(length) unsigned 8 bit variable
CHAR(length) signed 8 bit fixed
CHARACTER(length) same as char
VARCHAR(length) signed 8 bit variable
DATE 'C' time_t 32bit GMT
CTIME same as date
COUNTER 64 bit global unique value, may be converted to DATE
DOUBLE 'C' double type
FLOAT 'C' float type
INTEGER 32 bit signed integer
REAL same as FLOAT
SMALLINT 16 bit signed integer
INDIRECT A file treated as a field
[more about: CREATE TABLE ] [^top^]

CREATE TABLE table-name AS 
  
  SELECT  {expression1 [, expression2]...}{...}

  FROM  table-name1 [alias1] [, table-name2 [alias2] ]...

  [WHERE     search-condition]

  [GROUP BY  column-name1 [, column-name2]...

  [ORDER BY  column-name3 [DESC] [, column-name4  [DESC] ] ...]
[more about: CREATE TABLE AS (ALTER TABLE) ] [^top^]

CREATE USER user-name IDENTIFIED BY password

Creates a new user with the specified user-name and password.

[more about: CREATE USER] [^top^]

DELETE FROM table-name

  [WHERE search-condition]
[more about: DELETE FROM] [^top^]

DROP INDEX index-name
See also: SYSINDEX system table
[more about: DROP INDEX] [^top^]

DROP TABLE table-name
See also: SYSTABLES system table
[more about: DROP TABLE] [^top^]

DROP USER user-name
[more about: DROP USER] [^top^]

GRANT  {ALL}

       {privilege1 [,privilege2]...}

  ON   {table-name}

       {view-name}

  TO   {PUBLIC}

       {userid1 [,userid2]...}
privilegedescription
ALL User can do anything (default)
DELETE User can delete records
INSERT User can insert records
SELECT User can read records
UPDATE User can update records

See also: REVOKE, SYSUSERS system table, CHMOD(1), CHOWN(1)

[more about: GRANT PERMISSIONS] [^top^]

INSERT INTO table-name[(col-name1 [, col-name2]...)]

  VALUES(value1 [, value2]...)
[more about: INSERT INTO (new rows)] [^top^]

INSERT INTO table-name[(col-name1 [, col-name2]...)]

  SELECT-statement
[more about: INSERT INTO (selected rows)] [^top^]

SELECT [DISTINCT] {expression1 [[AS] alias1] [, expression2 [[AS alias2]]...}{...}

  FROM  table-name1 [alias1] [, table-name2 [alias2] ]...

  [WHERE      search-condition]

  [GROUP BY   column-name1 [, column-name2]...

  [HAVING     search-condition]]

  [ORDER BY   column-name3 [DESC] [, column-name4  [DESC] ] ...]
comparison operators
=, < ,> , != , >< , >= , <= standard comparison for all data types
[NOT] BETWEEN value1 AND value2bracketed range for all data types
[NOT] LIKEMetamorph query for text fields
(exact match text retrieval)
[NOT] LIKE3kewords only match within text field
(very fast)
LIKERkeyword Relevance ranking within text field
(fast, ok precision)
LIKEPrelevance ranking within text field
(high quality)
[NOT] MATCHESstandard SQL MATCH
[NOT] INSet Membership
logic operators
AND, OR, NOTMay be used to bind any set of conditions
math operators
+, -, *, /may be used on numeric and character data types

See also: Text Queries

[more about: SELECT ] [^top^]

UPDATE table-name

 SET column-name1 = expression1

  [, column-name2 = expression2]...

 [WHERE search-condition]
[more about: UPDATE] [^top^]

SQL REFERENCE


The aggregate functions operate on a set of rows, and return information about the set as a whole. These are particularly useful in conjunction with a GROUP BY clause.
FunctionDescription
AVG() Average of all the values
COUNT()Number of values
MAX() Maximum Value
MIN() Minimum Value
SUM() Total of all the values
[more about: Aggregate Functions] [^top^]

Column aliasing allows one to change the name of an output column. This is useful and needed in a couple of situations.

The first is that Texis WebScript will name the variable the same as the column name. If the default name of the column would be an illegal name, or would conflict with an existing variable, renaming the column lets you change the variable name at the same time.

The second situation is within the query itself. If you have a GROUP BY clause with either a HAVING clause or an ORDER BY clause, then any aggregate or calculated fields must be aliased, and the alias name used in the HAVING or ORDER BY clause. This is the only time the alias name can be used in the query.

[more about: Column Aliasing] [^top^]

One of the commonly desired features in a search interface is to find similar documents once a good match is found. The way to do this in Texis WebScript is to use the text2mm function in combination with a LIKEP query. When you are selecting the text to display you should also select the query to use, with the text2mm function:
<EXPORT $nquery>
.
.
<SQL "select Body, text2mm(Body) nquery from ...">
$Body
<A HREF=$url/morelike.html>Find Similar</A>
</SQL>
In the morelike function a LIKEP query is used to find the similar documents.
<A NAME=morelike>
<SQL "select id, Title from ... WHERE Body LIKEP $nquery">
<showrow>
</SQL>
</A>
[more about: Document Similarity] [^top^]

The order in which tables are specified in the FROM clause can significantly affect the query speed. Texis will try and arrange the tables in the best order. To disable this if you are sure you know the correct ordering you can use set nooptimize='join';, in which case Texis will process the tables in the order specified in the FROM clause. Because of this you should put the tables which can initially return the smallest number of rows first, preferably with an index. For example if you have two tables, one of customers, and the other of orders. You don't know the customer number of 'John Doe', but you want to see all his orders the correct way to write the query is
SELECT cust.name, orders.text FROM cust,orders WHERE
       cust.name = 'John Doe' and orders.custid = cust.id;
If cust.name is indexed it will find the customer record with the index, and then use an index on orders.custid to find the orders. If you switched the FROM clause it would look at each order, find the corresponding customer, and see if the name was 'John Doe', which will be slower.
[more about: Join Order] [^top^]

Literals are quantities that are obtained from the SQL statement rather than from a column. There are three types of literal available in SQL:
  • Integers
  • Floating point numbers
  • Character Strings

The range available in the numeric literals is machine dependent. You can typically count on at least the range in a long or double respectively.

Character strings are delimited by single quotes. To include a single quote in a string it should be doubled. For example:

'He''s one of us now.'
[more about: Literals] [^top^]

Texis includes a number of functions that can be used to manipulate data at the server. The functions are as follows:

FunctionDescription
File Functions
fromfile(filename)
fromfiletext(filename)
Returns the contents of a file
totext(text or filename)Converts a PDF or wordprocessor file to text
toind(text)Stores the text into a texis managed indirect and returns the filename
String Functions
abstract(text[, maxsize[, style[, query]]])Abstract a block of text
text2mm(text[, words])Generate a query from a block of text
length(text)Returns the length of a block of text
lower(text)Returns the lowercase form of a block of text
upper(text)Returns the uppercase form of a block of text
initcap(text)Returns the text with the first letter of every word in uppercase
sandr(search, replace, text)Returns the text with search replaced by replace
Other Functions
exec(cmd[, args])Allows execution of external commands
mminfo(query, text)Find out hit offset information
convert(data, type)Converts fields from one type to another
seq(increment[, init])Returns a number increment than the last, or init
random(max[, seed])Returns a random number less than max
math functionsacos, asin, atan, atan2, ceil, cos, cosh, exp, fabs, floor, fmod, log, log10, pow, sin, sinh, sqrt, tan, tanh
date functionsdayname, month, monthname, dayofmonth, dayofweek, dayofyear, quarter, week, year, hour, minute, second

[more about: SQL functions.] [^top^]

Table aliasing allows the renaming of table in the query. This has two uses. The first is simply a typing aid, in that a long table name can be aliased to a shorter name.

The second, and more interesting use, is that it allows a table to be joined to itself. One example of this would be to generate a listing of employees and bosses.

SELECT boss.name Boss, emp.name Employee
    FROM employees emp, employees boss
    WHERE boss.id = emp.boss_id
[more about: Table Aliasing] [^top^]

Some of the properties of Texis can be modified by issuing SQL SET statements. The syntax of the SET statement is
SET property = value
The value should be a literal string or number. In the following table are the most useful properties, and what they do:
PropertyValue
indexspaceA directoy to store indices. You can put indices in a different directory either for space reasons, or to improve performance.
addexpAn expression to use for creating metamorph indices. This adds to the expressions. The default expression is \alnum{2,99} which should catch most English words.
The properties only remain in effect for the duration of a connection to the database. This is typically one invocation of Texis.

Properties that affect Metamorph indices are kept with the index and do not need to be respecified. If you want to change the properties of an index you will need to drop it and re-create it. If searching must be maintained you can create a new index first with a different name, and then drop the old index.

[more about: Texis properties] [^top^]

When generating a query with a group by clause it is necessary to put the proper portions of the query in the WHERE clause and in the HAVING clause.

The WHERE clause will affect which rows are selected from the table to be grouped. The HAVING clause will determine which groups are actually returned.

For example the query:

SELECT DEPT, AVG(SALARY) AVSAL FROM EMPLOYEES
       WHERE SALARY > 50000
       GROUP BY DEPT
will select for each department the average salary of those people with a salary over 50,000. The query:
SELECT DEPT, AVG(SALARY) AVSAL FROM EMPLOYEES
       GROUP BY DEPT
       HAVING AVSAL > 50000
will select only those departments having an average salary over 50,000.
[more about: WHERE vs. HAVING] [^top^]

TEXIS WEBSCRIPT


<A NAME=name [PUBLIC|PRIVATE] [param[=value|$var] ...]>
  ... statements ...
</A>
Defines a function with given name. Parameters are local variables in the function, initialized with the named arguments from a call.

FlagActionDefault
PUBLIC Function is user-visible: can be entry point to script. If no functions are declared PUBLIC or PRIVATE
PRIVATE Function is private: cannot be called outside of script. If any function is declared PUBLIC or PRIVATE

[more about: <A>] [^top^]

<BREAK>
Ends innermost enclosing <WHILE>, <SQL>, <LOOP>, <READLN> or <TIMPORT> statement.

See also <WHILE>, <SQL>, <LOOP>, <READLN>, <TIMPORT>

[more about: <BREAK>] [^top^]

<CAPTURE [flags]>
  ...
</CAPTURE>
Redirects output inside block to $ret at close of block.

FlagAction
BINReturned value is binary.
OUTPUTAlso print output normally.

Return value in $ret: output of statements within block.

See also <EXEC>, <WRITE>

[more about: <CAPTURE>] [^top^]

<DB = path>
As directive (before any functions), sets default script database for
<SQL> statements, state table.
As a statement at run time (inside a function), changes to new database for <SQL> statements.

VersionDefault Database
Webinatordb subdir of script's directory
Commercial Windowsc:\morph3\texis\testdb
Commercial Unix/usr/local/morph3/texis/testdb

[more about: <DB>] [^top^]

<EXEC [flags] program [arg ...]>
  ... input to program ...
</EXEC>
Program is executed with given arguments; each value becomes one command-line argument. Enclosed statements' output is piped to program's input. Program output returned in $ret, one line per value.

FlagAction
NOBRDon't split output into lines.
BINOutput is binary. Implies NOBR.
BKGNDExecute in background; will not wait for program exit. Output ignored, $ret value is PID of program.

See also <CAPTURE>, <WRITE>

[more about: <EXEC>] [^top^]

<EXPORT $var1 [$var2 ...] [flags]>
Marks variables to be saved and restored at next script invocation.

Vars saved to Which vars When saved
State table Non-LOOP/SQL vars First time $url printed when vars set
URL LOOP/SQL vars Every time $url printed inside a loop
URL query string <EXPORT QUERY> vars Every time $urlq printed

Flag Action
URL Always export these variables to URL
TABLE Always export these variables to table
USEROK User (form) variables may override state values
QUERY Export to query string via $urlq

[more about: <EXPORT>] [^top^]

<IF condition1>
  ... statements if condition1 true ...
[<ELSEIF condition2>
  ... statements if condition2 true ...]
[<ELSE>
  ... statements if both are false ...]
</IF>
Condition may be simple: arg1 op arg2 where op is one of:
eq Equals
neq or ne Does not equal
gt Greater than
gte or ge Greater than or equal to
lt Less than
lte or le Less than or equal to
nmod Not mod: true if arg1 mod arg2 is 0

Or condition may be a SQL where clause.

See also <SWITCH>, <CASE>

[more about: <IF>, <ELSE>, <ELSEIF>] [^top^]

<LOCAL var[=value|$var] ...>
  ...
[</LOCAL>]

Declares variables to be local. Scope ends at </LOCAL> tag, or end of enclosing block if not given.

See also <A>

[more about: <LOCAL>] [^top^]

<LOOP [SKIP=s] [MAX=m] [REV] $var1 [$var2 ...]>
  ... statements ...
</LOOP>

Iterates over named variables, one value per loop iteration.

Attribute Value
SKIP Initial number of values to skip
MAX Max number of values to loop
REV Whether to loop in reverse order

Variable Value When Set
$loop Loop count (starts at SKIP, default 0) Start of each iteration
$next Next SKIP value Start of each iteration, and at loop exit

See also <SQL>, <WHILE>

[more about: <LOOP>] [^top^]

<PUTMSG call|log|print|all|override on|off>

Directive: sets whether to log, print, and/or call <putmsg> function on errors.

See also <vxcp>

[more about: <PUTMSG>] [^top^]

<READLN [options] $file>
  ...
</READLN>
Reads the given $file one line at a time.

OptionAction
REVRead file in reverse order, and start from end.
START=$exprStart returning lines with first one to match REX expresion $expr.
END=$exprStop returning lines when one matches REX expression $expr.
MAXLINES=$linesRead at most $lines from the file, regardless of START or END.
MAX=$nReturn at most $n lines, after START lines.
ROWDon't loop $ret: replace previous value each line.
SKIP=$linesSkip the first $lines returned lines (after START).

Return value in $ret: each line from file.

See also <read>, <spew>

[more about: <READLN>] [^top^]

<RETURN [$ret]>

Exits current function, optionally setting $ret.

See also <exit>

[more about: <RETURN>] [^top^]

<SCHEDULE [options] WHEN=schedule [var=val] [...]>

Schedule script for periodic execution according to schedule, which is a vCalendar schedule or one of the following syntaxes:

minutes
[EVERY] [n] DAY[S]|DAILY timeofday [minutes]
[EVERY] [n] WEEK[S|LY] [ON] weekday timeofday [minutes]
[EVERY] [n] MONTH[S|LY] [ON] [THE] FIRST|SECOND|THIRD|FOURTH|n [TO LAST] weekday|DAY [OF THE MONTH] timeofday [minutes]

where:

minutes = [EVERY] [n] MIN[UTE[S]] [[REPEAT] n [TIME[S]]
timeofday = AT [h]h[:][[m]m] [A|P[M]]
weekday = SUN|MON|TUE|WED|THU|FRI|SAT

OptionControls
START=dateStart schedule on or after Texis-parseable date (default now)
URLEND=/func.txtAppend /func.txt to URL when running script
COMMENT=textAdd comment to schedule listing for -LS command-line option

After all options, a list of variable assignments to pass to the script can be given.

[more about: <SCHEDULE>] [^top^]

<SQL [flags] "SQL command" [$cmd ...]>
  ... statements ...
</SQL>

Executes SQL command once, looping for each row returned. Returned fields become variables, one value added per iteration as in a <LOOP>.

Attribute Value
SKIP=n Initial number of rows to skip
MAX=n Max number of rows to return
NOVARSFlag: don't return variables from SQL statement
ROWFlag: return vars in a single row, don't append into list
DB=dbOverride <DB> for this statement
USER=userOverride <USER> for this statement
PASS=passOverride <PASS> for this statement
NULL=$valOverride $null for this statement
NONULLFlag: don't use $null for this statement

Variable Value When Set
$loop Number of rows returned (does not include SKIP) Start of each iteration
$next SKIP value for next <SQL> Start of each loop iteration and loop exit
$indexcount Number of index rows (if index used) Start of first iteration

Values of arguments after flags are concatenated to form SQL command. Embedded variable references in command become parameters.
If $null set, parameters matching it and their clauses are dropped from query.

See also <LOOP>, <TIMPORT>

[more about: <SQL>] [^top^]

<SQLCACHE = n>

Directive: number of Texis handles to cache for SQL statements.

See also <SQL>, <sqlcp>

[more about: <SQLCACHE>] [^top^]

<STACK=n>

Directive: sets Vortex call stack limit (-1 for no limit). Default is 250. One stack item used per function, block or loop call.

See also <vxcp>

[more about: <STACK>] [^top^]

<SWITCH switchval>
  <CASE value1>
    ... statements if switchval = value1 ...
  [<CASE op value2>
    ... statements if switchval op value2 is true ...
  ...]
  [<DEFAULT>
    ... statements if no matches above ...
  ]
</SWITCH>

switchval is a single variable or literal. First matching (true) <CASE> is executed. If none match and <DEFAULT> is present, it is executed. Same operators as <IF>, <ELSE>, <ELSEIF>

[more about: <SWITCH>, <CASE>] [^top^]

<TIMEOUT = n>
  ... HTML to print on timeout ...
</TIMEOUT>
Sets overall time limit on each script execution.
Default: 30 seconds.
[more about: <TIMEOUT>] [^top^]

<TIMPORT [flags] $schema [FROMFILE] $data|$file>
  ... statements ...
</TIMPORT>

Imports data from each element of buffer $data (or file $file if FROMFILE) using TIMPORT schema $schema. Returned fields become variables; loop executed once per row ala <SQL>.

AttributeValue
SKIP=n Initial number of rows to skip
MAX=n Max number of rows to return
NOVARSFlag: don't return any variables
ROWFlag: return vars in a single row, don't append into list
FROMFILE$file is filename list, not text buffer

Variable Value When Set
$loop Number of rows returned (does not include SKIP) Start of each iteration
$next SKIP value for next <TIMPORT> (given same data) Start of each iteration and loop exit

See also <SQL>

[more about: <TIMPORT>] [^top^]

<TRACESQL on|off|N>

Directive: turns SQL statement tracing on or off.

See also <sqlcp>

[more about: <TRACESQL>] [^top^]

<TRAP [CONNRESET=on|off|N] [[SIGNALS=]on|off]>

Directive: turns signal and connection-reset trapping on or off. For diagnostive purposes; not for general use.

See also <vxcp>

[more about: <TRAP>] [^top^]

<USER = user>
<PASS = pass>

Sets user and password to access SQL database with. Must be called before <SQL> statements.

See also <DB>

[more about: <USER>, <PASS>] [^top^]

<USES [DATE=date] module[=file] [module[=file] ...]>

List of modules to link in from library.

[more about: <USES>] [^top^]

<VERB [NOESC]>
  ... raw text ...
</VERB>
Enclosed text is output as-is (no Vortex statements), but HTML-escaped. If NOESC, text is verbatim (no HTML escapement).

See also <send>

[more about: <VERB>] [^top^]

<WHILE condition>
  ... statements ...
</WHILE>

Loops over statements while condition is true. Condition has same syntax as <IF>. $loop set every iteration, starting with 0 before first iteration. <BREAK> will also exit the loop.

See also <IF>, <ELSE>, <ELSEIF>, <BREAK>

[more about: <WHILE>] [^top^]

<WRITE [APPEND] $file>
  ...
</WRITE>

Redirects output inside block to $file. Appends instead of truncates if APPEND given. If $file is "-" (single dash), output goes to stdout (ie. no-op). If $file is "--" (two dashes), output goes to top-level stdout (ie. "break through" outer <CAPTURE> etc. blocks).

Return value in $ret: nothing (no effect on $ret).

See also <CAPTURE>, <EXEC>

[more about: <WRITE>] [^top^]

<abstract $text [$maxsz [$style [$query]]]>
Generate an abstract of the supplied $text value(s), of up to $maxsz (default 230) characters. $style is either smart (look for meaningful text) or dumb (just first part of text). If $query is given, query is searched for in text and abstract is centered on the best hit.
[more about: <abstract>] [^top^]

<adminsql [arg ...]>

Execute an arbitrary SQL statement, the concatenation of args. Prints result rows in an HTML table. Return value in $ret: None

See also <createdb>

[more about: <adminsql>] [^top^]

<apicp $name $value>
Modify Metamorph control parameters. Boolean settings take on, true, yes or a nonzero value to turn on; opposite to turn off.

Query protection settings:
Name Setting Default
alpostprocAllow post-processingoff
allinearAllow linear searchesoff
alequivsAllow equivalencesoff
alintersectsAllow @ intersectionsoff
alnotAllow "NOT" logic (- operator)on
alwithinAllow /w within operatoroff
alwildAllow wildcardson
qminprelenMinimum character length of wildcard prefix2
qminwordlenMinimum character length of term2
qmaxsetsMaximum allowed number of sets100
qmaxsetwordsMaximum allowed number of words per set100
qmaxwordsMaximum allowed number of words in overall query100
denymodeAction to take on disallowed querywarning
texisdefaultsSet Texis defaults (allow linear, post-processing, etc.)--
defaultsRestore Vortex defaults--

Query processing settings:
Name Setting Default
exactphrase Exact phrase processing off
prefixproc Prefix processing off
suffixproc Suffix processing on
rebuild Word rebuilding on
incsd Include start delimiter in hits off
inced Include end delimiter in hits on
withinproc Within (/w) processing on
minwordlen Minimum word length for prefix/suffix processing 255
intersects Default number of intersections 255
see Look up "see also" references during equivalence lookup off
keepeqvs Use equivalences for words/phrases off
keepnoise Keep noise words in query off
sdexp Default start delimiter expression None
edexp Default end delimiter expression None
eqprefix Equivalence file name builtin
ueqprefix User equivalence file name /usr/local/morph3/eqvsusr; or USROBJECTS.tbl file in database for Webinator
suffix Suffix list used during search see manual
suffixeq Suffix list used during equivalence lookup see manual
prefix Prefix list used during search see manual
noise Noise words see manual

Return value in $ret: None

[more about: <apicp>] [^top^]

<cal [options] [$dates [$events [$var ...]]]>
[</cal>]

Prints a calendar of events with links. $dates are the dates, $events are the corresponding text to print. In the looping syntax, the programmer must print each day's <TD>, text and </TD>.

Option What it does Default
TYPE=type Sets type: week, month, quarter or year Determined from $dates range
DATEVAR=date Name of variable to set to each day's date date
DAYFUNC=/day.html URL function/MIME extension for day-number links /day.html
EVENTFUNC=/event.html URL function/MIME extension for event links /event.html
MAXEVENTS=5 Max events to print per day. 5
BORDER=1 BORDER value for table 1
WIDTH=100% WIDTH value for table 100%
HEIGHT=50% HEIGHT value for table 50% (except for week format)
CELLPADDING=1 CELLPADDING value for table 1
CELLSPACING=0 CELLSPACING value for table 0
WEEKLEN=1 Length of weekday name strings to print 1 for quarter and year, else full length
MONTHFMT="%B %Y" Date format to print month header %B for year, else %B %Y
DAYFMT="%e" Date format for non-event days' numbers %e
NEWDAYFMT="%b %e" Date format for week type days that start a new month %b %e
EVENTFMT="<B>%e</B> Date format for event days' numbers <B>%e</B>
MONTHCLASS=class Style CLASS for month header none
WEEKCLASS=class Style CLASS for weekday names MONTHCLASS if given, else none
DAYCLASS=class Style CLASS for non-event days none
EVENTCLASS=class Style CLASS for event days DAYCLASS if given, else none
START=date Start date for calendar Earliest $dates value
END=date End date for calendar Latest $dates value
NOHREF Flag: don't link any days or events Off

[more about: <cal>] [^top^]

<caldate $varprefix>

Returns a list of dates from the variables submitted from a <calendar> form, using the variable prefix $varprefix

See also <calendar>, <cal>

[more about: <caldate>] [^top^]

<calendar $year $month $day $hour $min ["am"|pm" [$prefix [flags ...]]]>
or
<calendar $date [$prefix [flags ...]]>

Note: This function is obsolescent. Use <cal> instead.

Prints a calendar HTML form. Submitted date(s) can be read with <caldate>.

Argument Value
$year Year (4-digit)
$month Month number (January = 1)
$day Day of month
$hour Hour (24-hour unless am/pm flag)
$minute Minute (00-59)
am/pm AM/PM (and $hour is 12-hour)
$prefix Form variable name prefix (default cal)
$date Texis-parseable date

Flag Value
radio Radio buttons for days (default)
checkbox Checkboxes for days
julian Julian days (days into year)

Return value in $ret: None

See also <caldate>, <cal>

[more about: <calendar>] [^top^]

<checkbox $name $values $selected $output>

Argument Value
$name Name of checkboxes
$values Option values
$selected Which $values should be SELECTED
$output User-visible values

Return value in $ret: None

See also <radiobutton>, <options>

[more about: <checkbox>] [^top^]

<clist $values>

Return value in $ret: $values in one parenthetical, comma-separated string

See also <slist>

[more about: <clist>] [^top^]

<code2geo $num>
Decodes number from
<geo2code> back into latitude/longitude (returned as space-separated numbers in string).

See also <geo2code>

[more about: <code2geo>] [^top^]

<count $var>

Return value in $ret: Number of values of $var

[more about: <count>] [^top^]

<createdb $db $syspass $publicpass>

Creates the database $db with given _SYSTEM and PUBLIC passwords.
Return value in $ret: success or fail message

See also <adminsql>

[more about: <createdb>] [^top^]

<decrypt $data $key>
Decrypts $data with $key.

See also <encrypt>

[more about: <decrypt>] [^top^]

<encrypt $data $key>
Encrypts $data with $key.

See also <decrypt>

[more about: <encrypt>] [^top^]

<exit [$code]>

Exits script, with optional exit code (default 0).

[more about: <exit>] [^top^]

<fetch $theURL [$rawdoc]>
or (parallel version)
<fetch PARALLEL[=n] [URLS=]$urls [$loopvar ...]>
  ...
</fetch>

Return value in $ret: Raw (unformatted) document at URL $theURL, or contents of $rawdoc as if it were.

Parallel version: Up to n (default all) $urls are retrieved simultaneously. Completed URLS returned, fastest first, one per loop iteration. Use <urlinfo> for information about current URL in loop. $loop and $next incremented each iteration. See also <submit>, <urltext>, <urllinks>, <urlcp>, <urlinfo>

[more about: <fetch>] [^top^]

<flush>

Flushes any pending output. Returns nothing.

[more about: <flush>] [^top^]

<fmt format [arg ...]>
<strfmt format [arg ...]>

Standard printf formats
Format code Prints argument as
%d, %i Decimal integer
%u Unsigned decimal integer
%x, %X Hexadecimal integer
%o Octal integer
%e, %E Floating-point exponential
%f Floating-point (no exponent)
%g, %G Floating-point (%e or %f)
%c Single character
%s String
%% % sign
Flag What Applies to formats
- Left adjustment All
+ Sign positive numbers All numeric
(space) Leading space for positive numbers All numeric
0 Pad with 0's instead of spaces All numeric
# Alternate format %o, %x, %X, %e, %E
m.n Width, precision All except %ms, %mU, %mH
h Arg is short int Integer numeric
l Arg is long int Integer numeric
Additional formats/flags
Format code Prints argument as
%t Date/time (Texis date or counter field)
%T UTC (Universal time) date/time
%U URL encode string
%H HTML encode string
%V UTF-8 encode an ISO-8859 (ASCII) string
%v UTF-16 encode a UTF-8 string
%B base64 encode string; field width is chars per line to print
%b Binary integer
%r, %R Roman numeral
%F Fractional output of float
Flag Subflag What Applies to
m   Metamorph query and markup; next arg is query %s, %U, %H
  b Bold hit highlighting
  h HTML hit highlighting (default)
  n No backoff of hits inside <>
  p Paragraph formatting: double newlines replaced with <P>
  P Paragraph formatting: next arg (REX expression) replaced with <P>
  c Continue subhit count into next query
a   Next arg is strftime() format %t, %T
k   Put a "," every 3 places to left of decimal %d, %i, %u, %f, %g
K   Put next arg (string) every 3 places to left of decimal
&   Pad with &nbsp; instead of space %s, %d, %i, %u, %f, %g
_ (underscore)  Pad with ASCII 160 byte (&nbsp; code) instead of space %s, %d, %i, %u, %f, %g
_ (underscore)  Skip (don't print) leading BOM in UTF-16 output (%v); save (don't delete) leading BOM in UTF-16 input (%!v) %v, %!v
< (less-than)  Force UTF-16LE (little-endian) input/output %v, %!v
> (greater-than)  Force UTF-16BE (big-endian) input/output %v, %!v
!  Decode instead of encode%H, %U, %V, %v, %B, %c
h  HTML-escape out-of-range (>255 for %!V, >0x10FFFF for %v) characters instead of printing as ?%!V, %v
h  HTML-unescape sequences in source data%V, %!v
hh  Also HTML-escape low (7-bit) characters%V, %!V, %v, %!v
l (el)  Only encode low (7-bit) characters, or decode to 7-bit (multi-char) strings%H
q   Full encoding: encode forward-slash and at-sign too%U
p   Paragraph markup for %s and %H codes; path escapement (%20 instead of +) for %U code%s and %H; %U
w   Pass argument as "whopping" integer size (max available, usually 64-bit). Automatically set.%d, %i, %u, %x, %o

Escape sequences in format string:
EscapeMeaning
\nNewline (ASCII 10)
\rCarriage return (ASCII 13)
\tTab (ASCII 9)
\aBell (ASCII 7)
\bBackspace (ASCII 8)
\eEscape (ASCII 27)
\fForm feed (ASCII 12)
\vVertical tab (ASCII 11)
\\Backslash
\xhhhHexadecimal escape; hhh is 1 to 3 hex digits.
\0oooOctal escape; ooo is 0 to 3 octal digits.

Return value in $ret: None for <fmt>, printed string for <strfmt>

[more about: <fmt>, <strfmt>] [^top^]

<geo2code $lat $lon [$radius]>
Encodes latitude/longitude values into hash for BETWEEN (xxx, yyy) search. Returns one integer, or (xxx, yyy) string for box if $radius given.

See also <code2geo>

[more about: <geo2code>] [^top^]

<getpid>
Returns process id (integer) of current Vortex process.

See also <procexists>

[more about: <getpid>] [^top^]

<getvar $var>

Returns the values of the variable named by $var.
See also
<readvars>, <setvar>

[more about: <getvar>] [^top^]

<hash $buf>

Returns a counter type hash value for text buffer $buf. Different buffers almost certainly produce different hash values.

[more about: <hash>] [^top^]

<header NAME=$name [VALUE=$value]>
<header COOKIE=$cookie [VALUE=$value] [cookie-options]>

Prints HTTP header, if called before any output is generated. Prints generic header $name with $value, or Set-Cookie header if COOKIE used. More useful alternative to .bin URL syntax.

COOKIE AttributeValue
MAX-AGE=secondsMaximum age of cookie, in seconds
EXPIRES=dateExpiration time of cookie (alternate to MAX-AGE)
PATH=pathRoot URL path cookie will be returned for
DOMAIN=.domainDomain cookie will be returned for

[more about: <header>] [^top^]

<kill $pid [$sig]>
Sends signal $sig (default SIGTERM) to each process $pid. Signals may be names or numbers. Not supported under Windows.

See also <getpid>, <procexists>

[more about: <kill>] [^top^]

<loadavg>

Returns the system load averages in 3 values of $ret.

[more about: <loadavg>] [^top^]

<loguser $REMOTE_ADDR [$limit]>

Return value in $ret: success or fail message (fail if over $limit (5) unique users in the past minute)

See also <userstats>, <resetstats>

[more about: <loguser>] [^top^]

<lower $str>

Returns each value of $str in all lowercase.

See also <upper>

[more about: <lower>] [^top^]

<mm> ... $variables ... </mm>
Enables automatic hit-markup of variables printed within the block.

See also <sb>, <fmtcp>

[more about: <mm>] [^top^]

<nsinfo $name [$which]>

Returns information about most recently completed <nslookup> query.

Name Value Returned
addrs IP address(es) in the reply
name Canonical hostname
aliases Alias hostnames
errnum Internal error number (0 is Ok)
errmsg Internal error message
rawreply Raw reply packet data

See also <nslookup>

[more about: <nsinfo>] [^top^]

<nslookup [options] $host|$ip>
or
<nslookup PARALLEL[=n] [options] [HOSTS|ADDRS=]$hosts|$ips [$loopvar ...]>
  ...
</nslookup>

Looks up $host or IP address $ip and returns IP address or host name.

Parallel version: n at a time (default all) of $hosts or $ips list are looked up. $loop, $next set each loop iteration, results returned fastest first.

Option Action
BYADDR Force lookup by address (IP to host)
BYNAME Force lookup by name (host to IP)
MTERR Return empty string on lookup failure

See also <nsinfo>, <urlcp>, <fetch>

[more about: <nslookup>] [^top^]

<options $values $selected $output>
Prints an HTML form <OPTION> list with the given $values.

Argument Value
$values Option values
$selected Which $values should be SELECTED
$output User-visible values

Return value in $ret: None

See also <radiobutton>, <checkbox>

[more about: <options>] [^top^]

<pdfxml $query $Body [$color]>

Returns Metamorph hit information on PDF document $Body for a PDF browser plugin.

[more about: <pdfxml>] [^top^]

<procexists $pid>
Returns 1 for each process $pid that exists, 0 if not.

See also <getpid>, <kill>

[more about: <procexists>] [^top^]

<profiler INIT $table [$profile [$field]]>
<profiler GET $msg [$profile]>

Help manage a table of fixed message queries.

[more about: <profiler>] [^top^]

<pwencrypt $password $salt>
Unix style password encryption. If $salt is empty it will generate a random salt.
[more about: <pwencrypt>] [^top^]

<radiobutton $name $values $selected $output>
Prints HTML form radio buttons for given $values.

Argument Value
$name Name of buttons
$values Option values
$selected Which $values should be SELECTED
$output User-visible values

Return value in $ret: None

See also <checkbox>, <options>

[more about: <radiobutton>] [^top^]

<rand $min $max>

Return value in $ret: Random integer N, $min <= N < $max

See also <randpick>

[more about: <rand>] [^top^]

<randpick $var>

Return value in $ret: One randomly chosen value of $var

See also <rand>

[more about: <randpick>] [^top^]

<read $files [$offsets [$lengths]]>

Return value in $ret: Contents of each file in $files (1 file per value). Reading starts at $offset into file, default 0, negative offsets are from end of file. Length read is $length, default rest of file, negative length is rest of file.

See also <spew>, <READLN>

[more about: <read>] [^top^]

<readvars $varnames $urldata>

Reads variables from URL-encoded strings in $urldata. Only vars named in $varnames (if non-empty) are assigned.

See also <fmt>, <strfmt>'s %U format

[more about: <readvars>] [^top^]

<resetstats $REMOTE_ADDR>

Return value in $ret: None

See also <loguser>, <userstats>

[more about: <resetstats>] [^top^]

<rex $expr $data>                      <split $expr $data>
  or                                     or
<rex [options] $expr $data>            <split [options] $expr $data>
  ...                                    ...
</rex>                                 </split>

Return value in $ret: Data from $data matching REX expressions in $expr for <rex>; non-match data for <split>. Non-looping version by default. If any options given, looping syntax instead, and $loop/$next/$ret.off set.

Option What it does
ROW Do not accumulate hits in $ret
SKIP=$n Skip the first $n hits
MAX=$n Return at most $n hits
SPLIT Return non-match data instead (<split> behavior)
NONEMPTY Return only non-empty hits

See also <sandr>, Regular expressions

[more about: <rex>, <split>] [^top^]

<rmcommon $data $template [$maxrm]>

Removes the prefix and suffix text, on a word boundary, from each $data value, that is shared with the corresponding $template value. Up to $maxrm characters are removed (default: maximum amount of common text).

[more about: <rmcommon>] [^top^]

<sandr $expr $replace $data>

Return value in $ret: Values of $data with each matching $expr REX expression replaced with corresponding $replace value

See also <rex>, <split>

[more about: <sandr>] [^top^]

<sb> ... $variables ... </sb>
Enables automatic search and replace ("sandblast") of variables within block.

See also <mm>, <fmtcp>

[more about: <sb>] [^top^]

<send $values>

Prints $values as-is. Return value in $ret: None

See also <VERB>

[more about: <send>] [^top^]

<setvar [APPEND] $var $values>

Sets (appends if APPEND given) variable named $var to given $values.
See also
<getvar>

[more about: <setvar>] [^top^]

<sleep $seconds [wake]>

If wake given, return value in $ret: Number of seconds remaining (eg. could be non-zero if signal received)

[more about: <sleep>] [^top^]

<slist $intersect $values>

Return value in $ret: $values as Metamorph set query for $intersect intersections

See also <clist>

[more about: <slist>] [^top^]

<sort $var [ICASE|NUM] [DESC|ASC] [$var2 ...]>
Sort variables.

FlagAction
ICASEIgnore case, and sort alphabetically
NUMSort numerically
DESCSort descending
ASCSort ascending

Flags apply per-variable.
Return value in $ret if 1 variable, otherwise variables sorted in place.

See also <uniq>

[more about: <sort>] [^top^]

<spew $files [$offsets [$lengths]]>

Prints contents of each of the $files as-is, starting from $offsets into files (default start of file, negative offset is from end of file), for $lengths bytes (default rest of file, negative length is rest of file). Return value in $ret: None

See also <read>

[more about: <spew>] [^top^]

<sqlcp $name $value>
SettingControls Default
cache Texis handle cache: close closes it, stats to print statistics, resetstats to reset --
singleuser Texis single-user mode Use with caution! off
tracesql SQL statement tracing; see also <TRACESQL> off
traceidx Metamorph index tracing (diagnostic use) off
kdbfiostats KDBF I/O stats: 0, 1, 2, summary or a file name0
autocreatedb Whether to automatically create a database when needed for mathon
lookahead Whether to do one-row look-ahead in <SQL> statements for $rows.minon
rmlocks [force] [verbose] $db Removal of stale locks (or entire lock structure if force) for database $db  
addtable $file [$tbname [$db [$comment [$user [$pass [$nbits]]]]]] Add .tbl $file as table in database (eg. manually copied from elsewhere)  

See also <apicp>

[more about: <sqlcp>] [^top^]

<srand $seed>

Seeds the pseudo-random number generator.

See also <rand>

[more about: <srand>] [^top^]

<stat [options] $path> [</stat>]

OptionControls
ROWDo not accumulate return variables in arrays
SKIP=nSkip first n results
MAX=nReturn at most n results after initial SKIP
MAXDEPTH=nRecursively traverse subdirectories too, to a maximum depth of n. Default is 0; -1 is no limit.
NAME=wildcardOnly return results whose file name matches shell-style wildcard expression
ALLReturn . and .. directory entries too
SAMEDEVDo not cross filesystems from original $path when traversing directories
DEPTHFIRSTReturns directories' entries before the directory itself when traversing directories
SYMLINKReturn information about symlinks, not the files they point to (Unix)
FOLLOWSYMAlso traverse symlinks that point to directories
GLOBExpand shell-style wildcards in initial $path first
SORT=methodSort each directory's contents by method, which can be none, name (default), size, atime, mtime or ctime
ASCSort each directory's contents in ascending order (default)
DESCSort each directory's contents in descending order

Return VarTypeValue
$retvarcharFile path
$ret.errvarcharError from stat() or empty on success
$ret.depthlongNumber of dirs traversed from top-level $path
$ret.symlinkvarcharRaw target of symlink (if Unix and path is a symlink)
$ret.sympathvarcharCorrected path of symlink
$ret.sizelong or doubleSize of file
$ret.ownervarcharOwner of file
$ret.groupvarcharGroup of file
$ret.isrdlong1 if file is readable, 0 if not
$ret.iswrlong1 if file is writable, 0 if not
$ret.isexlong1 if file is executable, 0 if not
$ret.modevarchar10-character ls style permissions/mode string
$ret.atimedateLast access time of file
$ret.mtimedateLast modify time of file
$ret.ctimedateLast status change time of file
$ret.nlinkslongNumber of hard links to file, if filesystem supports it
$ret.devtypelongDevice type file is on (if filesystem supports it)
$ret.devlongDevice major/minor number (Unix) or 0 for A:, 1 for B: etc. under Windows
$ret.inolongInode of the file (if supported)
$ret.blkslongNumber of blocks consumed by file (if supported)
$ret.blksizelongPreffered block size for file transfers (if supported)

See also <sysutil>, <read>, <WRITE>

[more about: <stat>] [^top^]

<strcmp $a $b>
<strcmpi $a $b>

Return value in $ret: an integer for each comparison of each value of $a (as a string) against each value of $b:

  • < 0 if $a < $b
  • 0 if $a = $b
  • > 0 if $a > $b
strcmp is case-sensitive; strcmpi is not.

See also <strncmp>, <strnicmp>

[more about: <strcmp>, <strcmpi>] [^top^]

<strlen $str>

Returns length of each given string value.

See also <substr>

[more about: <strlen>] [^top^]

<strncmp $a $b $len>
<strnicmp $a $b $len>

Like <strcmp>, <strcmpi> except $len gives the max length of the corresponding $b string to use in comparison. Return value is:

  • < 0 if $a < $b
  • 0 if $a = $b
  • > 0 if $a > $b
strncmp is case-sensitive; strnicmp is not.

See also <strcmp>, <strcmpi>

[more about: <strncmp>, <strnicmp>] [^top^]

<strrev $str>

Returns each value of $str, reversed.

[more about: <strrev>] [^top^]

<strstr $needle $haystack>
<strstri $needle $haystack>

Return value in $ret: Indices into each $haystack value of each $needle value. Indices start at 0 for first character; if not found value is -1.
<strstr> is case-sensitive, <strstri> is not.

See also <substr>

[more about: <strstr>, <strstri>] [^top^]

<strtonum $text>

Returns: each $text string converted to a number.

[more about: <strtonum>] [^top^]

<submit [options] URL=$theURL [var=$value ...]>
Fetches $theURL using the HTTP POST method, with given form variables.

Option Value
URL=$theURL URL of form. FTP URLs supported (for GET, PUT, and DELETE methods).
FROMFILE=$file File to send content from; ``-'' for stdin.
TOFILE=$file File to write received content to; ``-'' for stdout. Content-derived fields in <urlinfo> etc. will be unavailable.
METHOD=$method HTTP method (OPTIONS, GET, HEAD, POST, PUT, DELETE or TRACE)
DATA=$data Raw data to send instead of variables.
CONTENT-TYPE=$type Content-type of raw data to send.
var=$value Variable to send with form

Return value in $ret: Result document from form submission

See also <fetch>, <urltext>, <urllinks>, <urlinfo>, <urlcp>

[more about: <submit>] [^top^]

<substr $str $offset $len>

Returns substring starting at offset (0 is first char, < 0 is from string end) of length $len (< 0 is rest of string) for each corresponding string $str.

See also <strstr>, <strstri>

[more about: <substr>] [^top^]

<sum $fmt $var [$var2 ...]>

Values of $var Return value in $ret
All numeric (integers or simple floats) Sum of values, then formatted and cast with $fmt code
One or more non-numeric Each value formatted with $fmt, then string-concatenated

See also <fmt>, <strfmt>

[more about: <sum>] [^top^]

<syscp $what [$arg ...]>

Controls various system or OS-level parameters.

CommandAction
chdir Change the current working directory to the argument

See also <sysinfo>, <sysutil>

[more about: <syscp>] [^top^]

<sysinfo $what [$arg]>

Gets system/OS information.

What Returns
time Wall-clock time; same as date, but sub-second precision (double)
proctime User, system, and real time used by process, in seconds (double). If given, $arg is subtracted
procmem Virtual size and resident set size of process, in bytes.
physmem Physical memory (RAM) of machine, in bytes.
getpid Process id
getppid Parent process id
procexists 1 if process id $arg exists, 0 if not
loadavg 3-value system load average (double)
cwd or pwd or getcwd Current working directory
platform Hardware-vendor-OS-filebits-ptrbits platform description string
regquery or regqueryvalue (Windows only) Registry value, given key subkey name [default]
maxdescriptors Max allowed open file descriptors (-1 if unknown)
opendescriptors Number of currently open file descriptors (-1 if unknown)

See also <syscp>, <sysutil>

[more about: <sysinfo>] [^top^]

<sysutil $action [options ...] $arg [...]>

Action and ArgsWhat It Does
mkdir or md $dir [...] Creates directories
chown or lchown $owner $file [...] Changes ownership of files (or symlinks if lchown). $owner is [owner][.][group]. Unimplemented under Windows.
chgrp or lchgrp $group $file [...] Changes the group of files. Unimplemented under Windows.
chmod $mode $file [...] Changes file permissions to symbolic or numeric $mode.
rm or del or delete $file [...] Removes files.
rmdir or rd $dir [...] Removes directories.
mv or rename $src [...] $dest Moves each $src file to $dest.
cp or copy $src [...] $dest Copies each $src file to $dest.
link or symlink $target [...] $name Creates a hard or soft link $name to the given $target. Unimplemented under Windows.

OptionWhat It Does
msg Turns on putmsg for this call
nomsg Turns off putmsg for this call
glob Wildcard-expand source file argument(s)
recurse Recursively descend source directories
force Force action, even if no file write permission
preserve Preserve file attributes for cp
asis Copy non-directories as-is instead of as files for cp
parents Create needed parent directories too for mkdir
nnn or [ugoa]=[rwx] Directory permissions for mkdir
-- End of options: following arguments are files

Returns empty string on success, otherwise a string describing the first error.

See also <stat>, <sysinfo>, <syscp>

[more about: <sysutil>] [^top^]

<uniq [SORTED] $var [ICASE|NUM] [DESC|ASC] [$var2 ...]>

Returns unique, sorted list of the given variables.

FlagAction
SORTEDAssume vars are already sorted as per given flags
ICASEIgnore case, and sort alphabetically
NUMSort numerically
DESCSort descending
ASCSort ascending

SORTED flag applies globally.
Return value in $ret if single variable, otherwise variables modified in place.

See also <sort>

[more about: <uniq>] [^top^]

<uniqcount>

Returns an integer list of the counts of each unique value, after <uniq> is called.

See also <uniq>

[more about: <uniqcount>] [^top^]

<upper $str>

Returns each value of $str in all uppercase.

See also <lower>

[more about: <upper>] [^top^]

<urlcp $param [$value1 [$value2]]>
Controls various page-fetching parameters ($param) There are several parameter value ($value1) types:
Setting TypeValue Arguments
Boolean (true/false)1 value: 1/0, "yes"/"no"
Integer1 integer value, with optional suffix KB/MB/GB
String1 string value

Possible $param settings: integer
NameTypeControlsDefault
timeoutinteger Timeout, in seconds, for <fetch>, <submit>, <nslookup>30
maxhdrsizeinteger Maximum header size, in bytes128KB
maxpgsizeinteger Maximum raw page size, in bytes512KB
maxredirsinteger Maximum number of redirects5
getframesboolean Whether to fetch framesno
getiframesboolean Whether to fetch iframesno
maxframesinteger Maximum number of frames fetched per document 5
offsiteokboolean Whether to fetch off-site redirects and frames yes
userstring User name for password-protected pages (Basic authentication) none
passstring Password for password-protected pages none
proxyuserstring User name for password-protected proxy (Proxy-Authorization header) none
proxypassstring Password for password-protected proxy none
redirmsgsboolean Whether to show redirect informational messages no
useragentstring User agent header Mozilla-compatible
8bithtmlboolean Whether to leave 8-bit (foreign) HTML characters as-is yes
alttxtboolean Whether to include ALT text from image tags yes
strikeboolean Whether to include <STRIKE> text in formatted output (from <urltext>) yes
delboolean Whether to include <DEL> blocktext in formatted output (from <urltext>) yes
selectboolean Whether to include <SELECT> block text in formatted output (from <urltext>) yes
inputboolean Whether to include <INPUT TYPE=text> values in formatted output (from <urltext>) yes
textareaboolean Whether to include <TEXTAREA> block text in formatted output (from <urltext>) yes
formtxt or formtextboolean Alias for select, input and textarea together yes
minclrdiffinteger Minimum foreground/background color difference for formatted text to appear 0
eatlinkspaceboolean Whether to trim leading/trailing whitespace from links before processing. true
urlnonprintstring How to treat non-printable (outside ASCII range 32-126) characters in URL links: asis, strip or encode asis
urlcanonslashBoolean Whether to canonicalize backslashes in URLs to forward slashes True
proxystring The URL to use as a proxy server none
reparentmodestring URL reparenting mode: abs, reroot, mirror or off None
reparentstring Re-parent links in HTML of fetched documents. If absolute URL, sets reparentmode abs and links made absolute, as if page were that URL. If full path, sets reparentmode reroot, links made relative (if possible) as if that were document root. Empty
reparentimgBoolean Re-parent image links also (if reparent set). False
ifmodsincestring The HTTP If-Modified-Since conditional-get header Unset
accept2 string lists The HTTP Accept header list Everything (*/*)
headerlist, 2 arguments Set the HTTP headers given in first arg to second arg values. None
clearheaders no args Clears any headers set with header. --
dnsmode sys or int Host name lookup routines to use int
nameservers list Nameservers used for host name lookup System dependent
dnsretrans integer Initial host name lookup retry interval System dependent
dnsretry Max number of retries for host name lookups System dependent
dnsservices List of host or bind Services to use and in what order, for host name lookup System dependent
dnsdomains List of domains Domains to search when resolving hostnames without embedded dots Host dependent (from /etc/resolv.conf)
dnsignoretrunc or dnsigntc Boolean Whether to ignore truncated-message flag in DNS replies True
fileexcludeList of file prefixes File prefixes to exclude when fetching local file:// URLs None on Windows; /dev/, /proc/ and /debug/ on Unix
fileincludeList of file prefixes File prefixes to include (require) when fetching local file:// URLs None
filenonlocal off|unc|ftpString How to treat non-localhost file:// URLs off
filerootFile prefix File root for local file:// URLs None
filetypes [add|del|set] [file|dir|device|symlink|other ...]List File types to allow for local file:// URLs None
scriptvaryeventsBoolean Whether to vary form elements' values to generate more JavaScript events True
scripturldecodeBoolean Whether to URL-decode javascript: links True
protocols [add|del|set] [$protocols ...]list List of allowed protocols to fetch http, https, ftp, gopher, javascript
linkprotocols [add|del|set] [$protocols|allowed|unknown ...]list List of protocols to allow in returned links from a page unknown, http, https, ftp, gopher, javascript, file
pagecacheszinteger Size of page cache for frames/iframes/scripts 5MB
getscriptsBoolean Whether to fetch <SCRIPT SRC=...> scripts True
javascriptBoolean Whether to execute inline JavaScript <SCRIPT>...</SCRIPT> blocks and enable other JavaScript features False
scriptevents [add|del|set] [$events ...]list List of JavaScript events to trigger after page f