Basic Syntax

xmlsh is derived from a similar syntax as the unix shells (see Philosophy) . If you are familiar with any of these shell languages (sh,bash,ksh,zsh) you should be right at home. An attempt was made to stay very close to the sh syntax where reasonable, but not all subtlies or features of the unix shells are implemented. In order to accomidate native XML types and pipelines some deviations and extensions were necessary. Lastly, as an implementation issue, xmlsh is implemented in java using the javacc compiler for parsing. This made support for some of the syntax and features of the C based shells difficult or impossible. Future work may try to tighten up these issues.


xmlsh can run in 2 modes, interactive and batch. In interactive mode, a prompt ("$ ") is displayed and in batch mode there is no prompt. Otherwise they are identical. Running xmlsh with no arguments starts an interactive shell. Running with an argument runs in batch mode and invokes the given script.
You can run an xmlsh script by passing it as the first argument, followed by any script arguments
xmlsh myscript.xsh arg1 arg2

For details on xmlsh invocation and parameters see xmlsh command


On invocation, xmlsh inherits the process environment of the caller. In particular this includes
The shell itself maintains additional environment which is passed to all subshells, but not to external (sub process) commands.

Running Commands / Basic Syntax

On startup, xmlsh reads the standard input (interactive mode) or the script file (batch mode), parses one command at a time and executes it. The following steps are performed

After the command is executed, then the process repeats.

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki