Cisco Cisco ASR 5700
Command Line Interface Overview
▀ Entering and Viewing CLI Commands
▄ Command Line Interface Reference, StarOS Release 17
138
After aborting the above action, you can again revisit newcontext:
[local]host_name(config)# context newcontext
[newcontext]host_name(config-ctx)#
You can control CLI autoconfirmation at the following levels:
Specific administrative user sessions: To enable or disable autoconfirmation, use the [no] autoconfirm
commands while in the Exec Mode.
All Future Sessions: To disable or re-enable autoconfirmation for all future sessions, use the [no] autoconfirm
commands while in the Global Configuration Mode.
For specific commands: Disable autoconfirmation for various commands that support the -noconfirm keyword,
such as the save configuration or card reboot commands.
Regulating the Command Output
For many CLI commands, you can use | grep and/or | more keywords to regulate or control the command’s output.
grep for Regular Expressions
Use the | grep keyword to filter through a command’s output for certain expressions or patterns. Only those portions of
the output that contain or exclude the pattern are displayed. The | grep has the following syntax:
the output that contain or exclude the pattern are displayed. The | grep has the following syntax:
| grep [ -E | -i | -n |-v | --extended-regexp | --ignore-case | --invert-match | --line-
number ] expression
number ] expression
Table 4. grep Options
Alternative
Keyword
Keyword
Description
-E
Match using extended regular expressions (EREs). Treat each pattern specified as an ERE (“IEEE Std 1003.1-
2001, Section 9.4, Extended Regular Expressions”). If any entire ERE pattern matches some part of an input line
excluding the terminating <newline>, the line shall be matched. A null ERE shall match every line.
2001, Section 9.4, Extended Regular Expressions”). If any entire ERE pattern matches some part of an input line
excluding the terminating <newline>, the line shall be matched. A null ERE shall match every line.
-i
Perform pattern matching in searches without regard to case. Lower case matches the same as upper case.
-n
Precede each output line by its relative line number in the file, each file starting at line 1. The line number counter
is reset for each file processed.
is reset for each file processed.
-v
Select lines not matching any of the specified patterns. If the -v option is not specified, selected lines shall be
those that match any of the specified patterns.
those that match any of the specified patterns.
--extended-
regexp
regexp
The long form of the -E option.
--ignore-case
The long form of the -i option.
--invert-
match
match
The long form of the -v option.
expression
Specifies the character pattern to find in the command’s output as an alphanumeric string of 1 to 256 characters.