User`s guide
Chapter 1 XgOS CLI Overview 5
Editing Commands on the Command Line
While entering a command, you can move around in the command-line text and edit
it. The following list shows the control key strokes that are available:
■ Left and right arrow keys: Move the cursor to either the left or to the right on the
command line.
■ Up and down arrow keys: Scroll up and down in the command history.
■ Ctrl-L: Retype the line
■ Ctrl-U: Erase the line
■ Ctrl-C: Quit the command
■ Ctrl-R: Search the command history.
■ Ctrl-E: Move to the end of the command
■ Ctrl-A: Move to the beginning of the command
Command History
The CLI maintains a history of the commands that you have entered, over multiple
sessions. Use the up and down arrows to scroll through the command history and
find a specific command. When you find the desired command, press the carriage
return on the keyboard to execute that command.
You can also search the command history for a sequence of characters using Ctrl-R.
As you type characters after Ctrl-R, the CLI searches backwards through the
command history for commands containing those characters. To select a command
found this way, press the carriage return. Alternatively, use Ctrl-R again to continue
the search.
Redirecting Output
You can redirect the output from any command may be redirected to a file by
placing a '>' sign followed by a filename, at the end of the command. For example,
entering the following will run the command, and place the output in a file called
allvnics in the current directory:
Another way to redirect the command output is to execute the command inside
backtick characters and then place the result in a variable. For example, if you enter:
show vnics > allvnics
var vnics = ‘show -list vnics’