CFmt.exe
Usage and Syntax
Also: cfmt.exe -file (infile) "(opts)"
Opts: -text
Opts: -tblock
Opts: -html
Opts: -xml
Opts: -json
Opts: -csv[N]
Arguments
-file | This argument, if it exists, is the input file to process. The input file must be followed by a valid (infile) argument, that is the pathname of the file to process. If this option is omitted, the CFmt program reads standard input and writes the matched results to standard output. |
( infile) | This argument must follow the -infile argument, and is the full or relative pathname of the file to process. |
(opts) | This argument is one of the format options. Exactly one format option can be used, immediately following the CFmt.exe program invocation. (See options below.) |
-text | This option formats the input into a list of text messages, where each message is followed by a blank line, and begins with the message record number, in #nnnnn format. (This format is found within the BMC Defender Server Reports > E-Mail screen. |
-tblock (or –block) | This option formats the input into a list of records where each record is the field name followed by the value, followed by a newline. This is similar (but not identical) to JSON format. Each record is separated by a newline. (This format is found within the BMC Defender Server Reports > Audit > Text Report screens.) |
-html | This option formats the input into a list of records where each record an HTML table entry. The resulting output is suitable for use as an HTML report, and contains the report header and JavaScript controls. (This format is found within the BMC Defender Server Reports > Audit > HTML Report screens.) |
-xml | This option formats the input into a list of records where each record is an XML entry, The result is a well-formed XML document, that can be used as a web method rather easily (by using the command in a .bat file that produces the correct headers, executed as a CGI program.) |
-json | This option formats the input into a list of records where each record is a JSON formatted entry, The result is a well-formed JSON document suitable for use with Java and other programming languages. |
-csv[N] | This option formats the input into a list of records where each record is a correct comma separated value format. The resulting output can be redirected to a file and then opened with Microsoft Excel or another reader. (This format is found within the BMC Defender Server Reports > Audit > CSV Report screens.) |
Application
The CFmt.exe program is commonly used as the final step of a pipeline, necessary to format messages for reporting. The program accepts as input a raw list of messages (such as that produced by the Cat functions described elsewhere.)