Wiki source for CommandXEcho

Show raw source

======Command xecho======

**xecho** prints XML arguments to output


xecho [ [[SerializationOptions serialization options]] ] [options] arg ...

Prints its arguments to the standard output seperated by the seqeunce separator ("\n") and terminated by the sequence terminator.


||-n||Omits the sequence terminator after all arguments are serialized||
||-p,-port port||Outputs to a named port instead of output||

If no arguments are given then nothing is output.
This command is similar to the [[CommandEcho echo]] command except that it does not
serialize arguments as text if the output is an XML output port or stream.
If the output is a text output port or stream then a newline is printed at the end of all arguments.

Supports the standard [ [[SerializationOptions serialization options]] ]


# Text example
$ xecho hi there

# Example using xecho to construct sequences
xecho arg1 1 "hi" <[ <foo>bar</foo>]> arg5 >{var}
xecho <[ $var[4] ]>

# Appending to a sequence with xecho
xecho <[ <foo/> ]> >{var}
xecho 2 3 4 >>{var}
xecho <[ <bar/> ]> >>{var}
xecho $var

To concatenate String content and variables, enclose them in double quotes as per

xecho "Processing $inputfile with option $opt on $dirs"
which will appear as one line

See Also [[CommandEcho echo]]

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki