Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell EMC Configuration Guide for the S3100 Series 9.14.2.4

PDF

Filtering show Command Outputs

Filter the output of a show command to display specific information by adding | [except | find | grep | no-more | save] specified_text after the command.

Example of the grep Keyword

The variable specified_text is the text for which you are filtering and it IS case sensitive unless you use the ignore-case sub-option.

Starting with Dell EMC Networking OS version 7.8.1.0, the grep command accepts an ignore-case sub-option that forces the search to case-insensitive. For example, the commands:
  • show run | grep Ethernet returns a search result with instances containing a capitalized “Ethernet,” such as interface GigabitEthernet 1/1.
  • show run | grep ethernet does not return that search result because it only searches for instances containing a non-capitalized “ethernet.”
  • show run | grep Ethernet ignore-case returns instances containing both “Ethernet” and “ethernet.”

The grep command displays only the lines containing specified text. The following example shows this command used in combination with the show system brief command.

DellEMC(conf)#do show system brief | grep 0
0     not present
NOTE Dell EMC Networking OS accepts a space or no space before and after the pipe. To filter a phrase with spaces, underscores, or ranges, enclose the phrase with double quotation marks.

The except keyword displays text that does not match the specified text. The following example shows this command used in combination with the show system brief command.

Example of the except Keyword

DellEMC#show system brief | except 1

Stack MAC                  : 4c:76:25:e5:49:40
Reload-Type                : normal-reload [Next boot : normal-reload]

The find keyword displays the output of the show command beginning from the first occurrence of specified text. The following example shows this command used in combination with the show system brief command.

Example of the find Keyword

DellEMC#show system brief | find 0
  2   Management   online         S3124           S3124           9-8(2-65)   30                            
  3   Member       not present
  4   Member       not present
  5   Member       not present
  6   Member       not present

--  Module Info  --
Unit  Module No   Status        Module Type                  Ports
---------------------------------------------------------------------------
  2   0           not present   No Module                     0

--  Power Supplies  --
Unit   Bay   Status       Type    FanStatus   FanSpeed(rpm)
---------------------------------------------------------------------------
  2     1    up           UNKNOWN up          NA
  2     2    absent               absent      NA

--  Fan  Status  --
Unit Bay   TrayStatus  Fan0    Speed   Fan1    Speed
--------------------------------------------------------------------------------                                                                                                
 2    1     up          up      7058    up      7164

Speed in RPM

The display command displays additional configuration information.

The no-more command displays the output all at once rather than one screen at a time. This is similar to the terminal length command except that the no-more option affects the output of the specified command only.

The save command copies the output to a file for future reference.

NOTE You can filter a single command output multiple times. The save option must be the last option entered. For example: DellEMC# command | grep regular-expression | except regular-expression | grep other-regular-expression | find regular-expression | save.

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\