Filtering show Commands
To find specific information, display certain information only or begin the command output at the first instance of a
regular expression or phrase, you can filter the display output of a
show
command.
When you execute a
show
command, and then enter a pipe ( | ), one of the parameters listed below, and a regular
expression, the resulting output either excludes or includes those parameters.
NOTE: FTOS accepts a space before or after the pipe, no space before or after the pipe, or any combination. For
example:
FTOS#command | grep gigabit |except regular-expression | find regular-
expression
display
displays additional configuration information
except
displays only the text that does not match the pattern (or regular expression)
find
searches for the first occurrence of a pattern
grep
displays text that matches a pattern.
The
grep
command option has an ignore-case suboption that makes the search case-
insensitive. For example, the commands:
show run |
grep
Ethernet
returns a search result with instances containing a capitalized
“Ethernet,” such as
interface GigabitEthernet 0/0
show run |
grep
ethernet
does not return the above search result because it only searches for
instances containing a noncapitalized “ethernet”
show run |
grep
Ethernet
ignore-case
returns instances containing both “Ethernet” and “ethernet”
no-more
does not paginate the display output
save
copies the output to a file for future use
Displaying All Output
To display the output all at once (not one screen at a time), use the
no-more
option after the pipe. This operation is
similar to the
terminal length screen-length
command except that the
no-more
option affects the output
of just the specified command. For example:
FTOS#show running-config|no-more
.
Filtering the Command Output Multiple Times
You can filter a single command output multiple times. To filter a command output multiple times, place the
save
option
as the last filter. For example:
FTOS# command | grep regular-expression | except regular-
expression | grep other-regular-expression | find regular-expression | no-more |
save
.
49
Summary of Contents for Force10 Z9000
Page 1: ...FTOS Command Line Reference Guide for the Z9000 System FTOS 9 1 0 0 ...
Page 96: ...96 ...
Page 194: ...194 ...
Page 312: ...312 ...
Page 540: ...540 ...
Page 546: ...546 ...
Page 560: ...560 ...
Page 566: ...566 ...
Page 590: ...action act UpdateCounter param0 1 0x01 param1 0 0x00 output truncated 590 ...
Page 624: ...624 ...
Page 638: ...638 ...
Page 648: ...648 ...
Page 659: ...Related Commands show gvrp displays the GVRP configuration 659 ...
Page 660: ...660 ...
Page 834: ...834 ...
Page 854: ...854 ...
Page 906: ...906 ...
Page 914: ...914 ...
Page 976: ...976 ...
Page 990: ...990 ...
Page 1006: ...1006 ...
Page 1008: ...1008 ...
Page 1026: ...1026 ...
Page 1145: ...10 211 1 2 Outgoing interface list GigabitEthernet 8 0 1145 ...
Page 1146: ...1146 ...
Page 1156: ...1156 ...
Page 1166: ...1166 ...
Page 1180: ...1180 ...
Page 1258: ...1258 ...
Page 1272: ...1272 ...
Page 1394: ...1394 ...
Page 1400: ...1400 ...
Page 1410: ...1410 ...
Page 1424: ...1424 ...
Page 1444: ...1444 ...
Page 1468: ...Version 8 3 8 0 Introduced on the S4810 1468 ...
Page 1470: ...1470 ...