Using ESXCLI Output
Many ESXCLI commands generate output you might want to use in your application. You can run esxcli with the --formatter dispatcher option and send the resulting output as input to a parser.
The --formatter options supports three values, csv, xml, and keyvalue and is used before any namespace.
esxcli --formatter=csv storage filesystem list
Lists all file system information in CSV format.
You can pipe the output to a file.
esxcli --formatter=keyvalue storage filesystem list > myfilesystemlist.txt