Case-insensitive grep operation
Syntax
<command> | [case-insensitive] {include | exclude | begin} <expression>
Description
The
case-insenstive
option is added to an existing grep operation to ignore the case of regular expressions and execute a case-insensitive pattern match.
Case-insensitive grep operation is supported for all commands.
Parameters
begin
Displays the lines from the first line that contains the regular expression in the unfiltered command output.
exclude
Displays the lines that do not contain the regular expression from the command output.
include
Displays the lines that contain the regular expression from the command output.
Examples
The following example displays the output of the command
show running-config
without case-insensitive option.
switch(config) # show running-config | include vlan vlan 1 vlan 10 vlan 11 vlan 12 vlan 13 vlan 14 vlan 15
The following example displays the output of the command
show running-config
with case-insensitive option.
switch(config) # show running-config | case-insensitive include vlan vlan 1 name "DEFAULT_VLAN" vlan 10 name "VLAN10" vlan 11 name "VLAN11" vlan 12 name "VLAN12" vlan 13 name "VLAN13" vlan 14 name "VLAN14" vlan 15 name "VLAN15"