NAME

veda-run-ilx - Run a SKILL/SKILL++ script from the command-line

SYNOPSIS

veda run-ilx script [script-arg]...
veda-run-ilx script [script-arg]...

DESCRIPTION

Runs a SKILL/SKILL++ script in skill, dbAccess, virtuoso -nograph or virtuoso, depending on its requirements.

Scripts are ordinary SKILL files, preceded by a specially-formatted comment header, e.g.:

#!/usr/bin/env veda-run-ilx
# @language skill
# @requires testing
printf("Hello, World!\n")

In the above,

In addition to the installed Veda packages, a number of implementation pseudo-packages are recognized, and cause the selection of an interpreter with the required features. E.g., @requires db triggers evaluation in dbAccess, which is the "minimal" interpreter exposing the Cadence db* API. Here is the list of recognized pseudo-packages and their corresponding minimal interpreter:

The default interpreter, chosen in the absence of a request for any implementation package, is the skill command.

The run-ilx command defines one globally available, no-arguments function, VedaRunScriptArgs, which can be used to query the [script-arg]... passed on the command-line:

(VedaRunScriptArgs)

cf. EXAMPLES section below.

EXAMPLES

Given the hello.ilx file:

#!/usr/bin/env veda-run-ilx
# @language scheme

;; Defining a "main" function is considered good style.
(defun Hello (args)
  (let ((who (if args
                 (buildString args ", ")
                 "World")))
    (printf "Hello, %s!\n" who)))

;; Go.
(Hello (VedaRunScriptArgs))

one can do:

$ chmod 755 hello.ilx
$ ./hello.ilx
Hello, World!
$ ./hello.ilx Roger
Hello, Roger!
$ ./hello.ilx Roger Muscadet
Hello, Roger, Muscadet!

SEE ALSO

Crosstwine Veda on the Web