Revision [1366]

Last edited on 2010-05-09 05:48:22 by DavePawson [Added operating system calls]
Additions:
===Operating System Calls===
In Linux or Windows command shells, you run commands at the prompt. E.g. to execute a Java program, run a C program
or anything else. From within an xmlsh script you can do just the same. Assume you have a Java program, in XXX.jar
that you want to run and collect the output.
op=$(java -jar XXX.jar -i inputFile.txt -t 10)
That runs the program, returns the output of the program and stores it in the $op variable ready for further use.
In this way, **anything** you can do from the command line you can do from within an xmlsh script


Revision [1360]

Edited on 2010-05-08 04:51:21 by DavePawson [XML variables. changed $x to $a]
Additions:
echo $a
Deletions:
echo $x


Revision [679]

Edited on 2009-08-25 07:18:01 by DavidLee [XML variables. changed $x to $a]
Additions:
====XML Serialization and Parsing====
For details on the XML serialization and parsing options see [[Serialization]]


Revision [640]

Edited on 2009-07-09 07:46:35 by DavidLee [XML variables. changed $x to $a]
Additions:
====Details====
For details on xmlsh invocation and parameters see [[CommandXmlsh xmlsh command]]


Revision [217]

Edited on 2008-06-03 06:22:54 by DavidLee [XML variables. changed $x to $a]
Additions:
This example creates an XML variable "x" and assigns it am xml sequence
Deletions:
This example creates an XML variable "x" and assigns it a sequence of integers


Revision [216]

Edited on 2008-06-03 06:22:29 by DavidLee [XML variables. changed $x to $a]
Additions:
$ x=<[1,"hi",<foo>bar</foo>,4]>
1 hi <foo>bar</foo> 4
Deletions:
$ x=<[1,2,3,4]>
1 2 3 4


Revision [137]

Edited on 2008-04-26 07:38:21 by DavidLee [XML variables. changed $x to $a]
Additions:
xmlsh supports both string and XML variables. See [[Variables]] for more details.
xmlsh also supports XML expressions and variables. See [[XmlExpressions XML Expressions]] for details on XML Expressions.
Deletions:
xmlsh supports both string and XML variables.
xmlsh also supports XML expressions and variables.


Revision [136]

Edited on 2008-04-26 06:57:38 by DavidLee [XML variables. changed $x to $a]
Additions:
=====Variables=====
xmlsh supports both string and XML variables.
Variable types are dynamic, they take on the type of the last assigned expression.
====String Variables====
xmlsh supports simple string variables and variable substitution like sh.
$ V1="string"
$ V2="another $V1"
$ echo $V2
another string
====XML Variables====
xmlsh also supports XML expressions and variables.
This example creates an XML variable "x" and assigns it a sequence of integers
$ x=<[1,2,3,4]>
$ for a in $x ; do
echo $x
1 2 3 4


Revision [135]

Edited on 2008-04-26 06:50:47 by DavidLee [XML variables. changed $x to $a]
Additions:
Similarly pipelines to either internal or external commands.
For example:
$ for var in a b c ; do
echo $var
done
a
b
c
Just as sh, the PATH variable specifies the directories
Deletions:
Similarly pipelines to either internal or external commands. Just as sh, the PATH variable specifies the directories


Revision [134]

Edited on 2008-04-26 06:48:42 by DavidLee [XML variables. changed $x to $a]
Additions:
%%(shrell)
C:\p4dell\DEI\xmlsh\win32>xmlsh
$
C:\p4dell\DEI\xmlsh\test>xmlsh run_tests.xsh
running tests in core
Running test core_andor.xsh
Running test core_args.xsh
Running test core_brace.xsh
Running test core_case.xsh
Running test core_for.xsh
Running test core_here.xsh
Running test core_if.xsh
Running test core_subshell.xsh
Running test core_vars.xsh
Running test core_while.xsh
running tests in builtin
Running test builtin_read.xsh


Revision [133]

Edited on 2008-04-26 06:25:15 by DavidLee [XML variables. changed $x to $a]
Additions:
=====Basic Syntax=====
Deletions:
====Basic Syntax=====


Revision [132]

The oldest known version of this page was created on 2008-04-26 06:25:01 by DavidLee [XML variables. changed $x to $a]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki