This chapter describes some miscellaneous commands that can be used to show the version of the Master Server application, formats an object, and perform Perl-type and XSLT transformations on a file.
The following table summarizes the CLI commands described in this chapter.
Table 14–1 Summary of the util Commands
Command |
Description |
---|---|
util.msv |
Show the version of the Master Server application. |
util.reformat |
Format an object. |
util.xfm |
Transform a serialized object representation to a human-readable representation. |
This command shows the version of the Master Server application.
Table 14–2 Arguments and Result for the util.msv Command
Result |
Syntax |
Description |
|
---|---|---|---|
result |
String |
The version of the Master Server application |
This command formats an object.
The following list the command-specific output formats that are available to specific commands:
Detailed text output of components
Detailed text output of comparisons
Detailed text output of folders
Detailed text output of host data
Detailed text output of network data
Summarized output of network data
Detailed text output of plans
Detailed text output from the running of plans
Detailed text output of plug-ins
Detailed text output of notification rules
Very detailed text output describing users and user groups
Detailed text output describing users and user groups
Summarized text output describing users and user groups
Argument/Result |
Syntax |
Description |
|
---|---|---|---|
self |
[R] |
Object |
The argument and result |
result |
Object |
The argument unaltered |
This command is used to transform a serialized object representation to a human-readable representation.
Table 14–4 Arguments for the util.xfm Command
Argument |
Syntax |
Description |
|
---|---|---|---|
in |
[R] |
ReaderWrapper |
The input stream to be transformed |
type |
[R] |
TransformType |
The type of transformation to apply to the input stream |
xfm |
[R] |
ReaderWrapper |
The transformed stream |
This example performs a PERL transformation, which is described in the perl.xml file, on the text specified in the in.txt file. The result is written to standard output. You can use the -of argument to redirect the standard output to a file.
cr_cli -cmd util.xfm -in in.txt -type PERL -xfm perl.xml -u terry -p 123xyz |
Since the class of the input stream is ReaderWrapper, you can specify any syntax supported by the String2ReaderWrapper converter to specify each stream's source. For example, to read input from standard input instead of from the in.txt file, use -in - instead of -in in.txt.