You can automate Command line Interface in different ways. Some tools are available especially for CLI automation. Those tools are available to get the output of command line. For ex. Expect/Tcl. Another thing is, you can copy the content of Command prompt and then compare as per your requirements.