======Command xecho======
=====Name=====
**xecho** prints XML arguments to output
====Synopsis====
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.
====Options====
||-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]] ]
Example
# Text example
%%
$ xecho hi there
hi
there
%%
# Example using xecho to construct sequences
%%
xecho arg1 1 "hi" <[ bar]> arg5 >{var}
xecho <[ $var[4] ]>
%%
Result
%%
bar
%%
# Appending to a sequence with xecho
%%
xecho <[ ]> >{var}
xecho 2 3 4 >>{var}
xecho <[ ]> >>{var}
xecho $var
%%
Result
%%
2
3
4
%%
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
----
[[Commands]]
[[CategoryCommands]]
See Also [[CommandEcho echo]]