The idea is simple. 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 element works by sending output of the script to stdout or resource specified by the URL connection parameter. Example:
<!-- 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. -->
echo Exported $row
It also provides limited abstraction from the operating system shell environment by means of <dialect> element:
Echo Running Windows
echo Running Linux/Unix
echo Running Mac OS
It is inspired by the driver suggested in the early days of Scriptella, but the actual implementation got lost due to javaforge shutdown.
One of the immediate use-cases - it will serve as a replacement for the mail driver, which is going to be removed in 1.3 due to compatibility problems with JDK11.
But there are many more usages for shell scripts.
<connection id="out" driver="shell" />