Table 7. CLI line editing commands (continued)
Ctrl-Key Combination
Description
Ctrl-W
Deletes the last word you typed.
Ctrl-Z
Moves from any CONFIG level of the CLI to the
Privileged EXEC level; at the Privileged EXEC
level, moves to the User EXEC level.
For a complete list of CLI commands and syntax information for each command,
see the
Configuration Guide
.
Searching and filtering output from CLI commands
You can filter CLI output from
show
commands and at the
—More—
prompt. You can
search for individual characters, strings, or construct complex regular expressions to
filter the output.
Searching and filtering output from show commands
You can filter output from
show
commands to display lines containing a specified
string, lines that do not contain a specified string, or output starting with a line
containing a specified string. The search string is a regular expression consisting of
a single character or string of characters. You can use special characters to
construct complex regular expressions. See “Using special characters in regular
expressions” on page 33 for information on special characters used with regular
expressions.
Displaying lines containing a specified string
The following command filters the output of the
show interface
command for port
3/1 so it displays only lines containing the word “Internet”. This command can be
used to display the IP address of the interface.
NetIron # show interface e 3/1 | include Internet
Internet address is 192.168.1.11/24, MTU 1518 bytes, encapsulation ethernet
Syntax:
<show-command>
| include
<regular-expression>
Note:
The vertical bar (
|
) is part of the command.
Note that the regular expression specified as the search string is case sensitive. In
the example above, a search string of “Internet” would match the line containing the
IP address, but a search string of “internet” would not.
Displaying lines that do not contain a specified string
The following command filters the output of the
show who
command so it displays
only lines that do not contain the word “closed”. This command can be used to
display open connections to a B48C or B50C switch.
NetIron #
show who | exclude closed
Console connections:
established
you are connecting to this session
2 seconds in idle
Telnet connections (inbound):
1
established, client ip address 192.168.9.37
27 seconds in idle
Telnet connection (outbound):
SSH connections:
Chapter 5. Getting familiar with c-series Command Line Interface (CLI)
31
Summary of Contents for 4002-C4A
Page 2: ......
Page 8: ...vi IBM Ethernet Switch c series Installation and User Guide ...
Page 10: ...viii IBM Ethernet Switch c series Installation and User Guide ...
Page 12: ...x IBM Ethernet Switch c series Installation and User Guide ...
Page 26: ...2 IBM Ethernet Switch c series Installation and User Guide ...
Page 39: ...net48bc017 Figure 10 Front rack mount position Chapter 3 Installation 15 ...
Page 41: ...net48bc019 Figure 12 Mid rack mount position Chapter 3 Installation 17 ...
Page 60: ...36 IBM Ethernet Switch c series Installation and User Guide ...
Page 68: ...44 IBM Ethernet Switch c series Installation and User Guide ...
Page 82: ...58 IBM Ethernet Switch c series Installation and User Guide ...
Page 93: ......
Page 94: ... Part Number 45W3139 Printed in USA GC27 2238 00 1P P N 45W3139 80218 001 ...