|
|
This chapter describes the commands of the complex list editor built into the command line interface. This line editor allows you to manage (create, modify, delete, and view) these lists from the command line interface. Each of these lists has its own unique syntax that is described for each section. The edit config command can also be used as a line editor for the entire configuration.
edit config [section]After entering the command, you can use the following subcommands:
{append [line_number] |
edit config | Edits the entire configuration, including all sections. |
edit config section | Enter a valid section name to add lines to that section. See the "Edit Config Command Sections" section for all sections listed alphabetically. When a section name has been successfully entered, you will be in the line editor for the specified section. |
The editor modifies a local buffer of the list which is separate from the configuration buffer that the rest of the command line interface uses. Changes made in the editor are not committed to the command line configuration buffer until they are saved using the exit editor command. It is also possible to end an editing session without saving changes by using the quit editor command.
The normal prompt within the editor is:
edit section>
The editor will delete the list being edited, if it is saved with no lines in the buffer.
Comments and blank lines may occur anywhere in a configuration. Comments begin with a pound sign (#) and continue until the end of the line.
# This is a comment [ New Section ] # So is this
append | The append subcommand is used to append lines into the buffer. Lines are appended after the specified line_number or the current line if none is specified. When editing a section, line 1 contains the section name, so specify line 1 in the append statement to add lines after the section name. After entering the append subcommand, a brief help message will be displayed and the prompt will change to "Append>". Any lines entered at this prompt will be placed in the editor buffer after the specified line number. To stop adding lines, enter a "." on a line all by itself. Edit section> append 1 Enter lines at the prompt. To terminate input, enter a . on a line all by itself. Append> These lines will be appended Append> at the beginning of the buffer. Append> . Edit section> If an error occurs while appending lines, a diagnostic note will be printed out and the message "Append failed." will be displayed. | ||
delete | The delete subcommand is used to delete the specified range of lines in the editor buffer. If only one line_number is entered, only that line will be deleted. If no range is specified, then the current line is deleted. There is no "undo" command; lines deleted will be lost forever. | ||
The print subcommand is used to display a range of lines from the editor buffer. If only one line_number is entered as part of the range, a full screen will be displayed beginning with the specified line number. If no range is specified, a full screen of lines beginning with the current print line will be displayed. The current print line is the current line for the first print or list subcommand. Subsequent print or list subcommands with no range will display a screenfull beginning with the last line from the previous display. | |||
list | The list subcommand has the same behavior as the print subcommand, except that non-printing characters are printed unambiguously. Control characters are printed out as <C-X> (where X is the control character, a tab would be <C-I>, a backspace would be <C-H>, and line feed would be a <C-J>). The delete character is printed out as <DEL>. All other non-printing characters are displayed as <\#> (where # is the character displayed as an octal number). The end of the line is marked with a "$". Edit section> list 1 2 1: These lines will be appended$ 2: at the beginning of the buffer.$ Edit section> | ||
help | The help subcommand displays a short description of valid editor commands. | ||
quit | The quit subcommand is used to leave the editor and ignore the changes that were made during the current editor session. The editor buffer is discarded and the list in the command line configuration buffer will remain the way it was prior to invoking the editor. If the editor buffer has been modified when issuing the quit subcommand, the editor will ask if it should abandon the changes. | ||
exit | The exit subcommand will save the editor buffer and leave the editor. When editing some list types, a syntax checker will be run on the list when the editor exits. If errors are reported, the editor will offer a chance to re-edit the list, allowing the reported errors to be corrected.
| ||
line_number | beginning_line_number ending_line_number |
|
| Command | Description |
|---|---|
configure | Enters the configuration editor to modify, delete, or add parameters. |
reset reset config | Reset configuration with current or factory settings. |
Save a new configuration and restart immediately. | |
show show config | Display device's text-based configuration and default parameters. |
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Wed Sep 27 10:56:20 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.