Working With CLI Command Results

Server Administrator Command Line Interface (CLI) users can use command output in various ways. This section explains how to save command output to a file and how to select a format for your command results that fits different objectives.

Output Options for Command Results

CLI command output displays to standard output on your system in a command window, in an X-terminal, or on a screen, depending on your operating system type.

You can redirect command results to a file instead of displaying them to standard output. Saving command output to a file allows you to use the command output for later analysis or comparison.

Whether you display command results to standard output or have the command results written to a file, you can format the results. The format you select determines the way the command output is displayed and the way the command output is written to a file.

Controlling Command Output Display

Each operating system provides a means of controlling the way that command results display to standard output. The following is a useful command for ensuring that command results do not scroll by before you can view them. The same command syntax works for the Microsoft® Windows® command prompt, the Red Hat® Enterprise Linux® terminal, and the SUSE® Linux Enterprise Server terminal. To display command output with control over scrolling, type the CLI command and append the pipe symbol followed by more. For example, type:

omreport system summary more

The multiscreen system summary displays the first screen. When you want to see the next screen of command output, press the spacebar.

Writing Command Output to a File

When redirecting command results to a file, you can specify a filename (and a directory path if necessary) to which you want the command results to be written. When specifying the path to which you want your file to be written, use the appropriate syntax for your operating system.

You can save command results in two ways. You can overwrite any file that has the same name as the output file you specify, or you can keep adding results of commands to a file of the same name.

Working With CLI Command Results

187

Page 187
Image 187
Dell Command Line Interface manual Output Options for Command Results, Controlling Command Output Display, 187