How to run an xmlsh script


An xmlsh "script" is nothing more then xmlsh commands exactly as you would type them interactively, put into a text file.
The file extension you should use for xmlsh scripts is ".xsh" so that xmlsh can know this is an xmlsh script without opening it.

There are 2 ways to run an xmlsh script.

Running a script from within xmlsh


If you are already running xmlsh, either interactively or in a script, you can run an xmlsh script by using its filename with or without the ".xsh" extension as the command. Similar to how shells search the PATH variable, xmlsh searches the XPATH variable to locate your script (and also any imported Extension Modules).

If the

Example
$ cd $XMLSH/test
$ ./run_tests



Running a script from outside xmlsh


You run an xmlsh script from outside xmlsh by passing the script name in as the first argument to the xmlsh program, including the ".xsh" extension.

Example assuming the xmlsh startup script is in your path ( see HowToInteractive )

xmlsh run_tests.xsh




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