To convert the output format of a command that you have passed to a file, you can use the reformat.util command.
The util.reformat command reads in data from the output file you specify and reformats it using the output format you choose.
For example, if you have created a host and stored the output from the hdb.h.add command in serialized format in a file named hostFile:
cr_cli -cmd hdb.h.add -o serialized -u [user] -p [password] -name myhost -tID NM:roxhost > hostFile |
you can give util.reformat the output of the previous command and tell it to use the detail format by passing it hostFile using the file: option as described in Passing Data to an Individual CLI Argument:
cr_cli -cmd util.reformat -u [user] -p [password] -o hdb.detail -self file:hostFile |
which will return:
ID: 010010000204-1027365659275-00170-1199101891 Name: myhost Description: Virtual: false Hidden: false Type ID: 010010001024-0000000000000-00001-0000000004 Attributes: <Table is empty> Applications: <Table is empty> |