| Class | Description |
|---|---|
| Driver |
Shell scripts driver.
|
| ShellCommandRunner |
Runner for shell commands, abstracting threading and process details.
|
| ShellConnection |
Represents a shell script connection.
|
| ShellConnectionParameters |
Connection parameters for shell driver.
|
| ShellScriptExecutor |
Executes a shell script and sends its output to the specified writer.
|
| Enum | Description |
|---|---|
| ShellOs |
Represents target shell OS
|
| Exception | Description |
|---|---|
| ShellProviderException |
Thrown to indicate a problem with shell script execution.
|
The query works by executing a shell script and exporting its output as a set of rows, each row representing a line in the output. Script works by sending output of the script to stdout or resource specified by the URL connection parameter.
The driver provides a limited abstraction from the operating system shell environment by the following means:
<dialect name="*windows*>os.name and os.version system properties.
This behavior can be overriden by explicitly setting os_behavior property| Driver class: | scriptella.driver.shell.Driver |
| URL: | URL of the file to read from and send output to. URIs are resolved relative to a script file.
If url is not specified console (System.in/out) is used. Only applies to <script> elements |
| Runtime dependencies: | None. |
| Name | Description | Required |
|---|---|---|
| os_behavior | Specifies target OS environment and behavior. | No, by default the behavior is inferred from os.name/os.version system properties. |
| shell_cmd | Comma-separated list of arguments, representing shell command executable and its parameters, e.g. /bin/sh,-c. |
No, the default list of arguments is OS-specific and is controled by the os_behavior property. |
row variable to inner elements.
Script elements also defined as shell commands. The difference from query element is that it's possible to control
where the stdout goes by means of url connection parameter.
<!-- The shell script of the query element produces 2 lines. They are consumed by the inner script element
which is printing every line of the consumed row prepended with "Exported" prefix. -->
<query connection-id="in">
echo Line${1}
echo Line2
<script connection-id="out">
echo Exported $row
</script>
</query>
See ParametersCallbackMap class Javadoc for more details.
Copyright © Copyright 2006-2019 The Scriptella Project Team.