


Example of Displaying Static Configuration Data.Example of Output Displayed in XML Tag Format.Example of Counting the Number of Lines of Output.Examples of Configurations and Their Differences in XML.Examples of Configurations and Their Differences in Text.This topic describes and provides examples of the pipe ( | ) filter functions that the
#Grep pattern ip serial number#
Output: Hardware inventory: Item Version Part number Serial number Description Chassis F0632 MX80 PEM 0 Rev 04 740-028288 VK09886 AC Power Entry Module Routing Engine BUILTIN BUILTIN Routing Engine TFEB 0 BUILTIN BUILTIN Forwarding Engine Processor FPC 0 BUILTIN BUILTIN MPC BUILTIN Fan Tray Fan Tray


Output: FPC 1 BUILTIN BUILTIN MPC BUILTINĪ pipe filter of | except "FPC 1" displays the following To separate the start and end of aįor example, if a command produces the following output: show chassis hardware Hardware inventory: Item Version Part number Serial number Description Chassis F0632 MX80 Midplane REV 09 711-031594 ZW0568 MX80 PEM 0 Rev 04 740-028288 VK09886 AC Power Entry Module Routing Engine BUILTIN BUILTIN Routing Engine TFEB 0 BUILTIN BUILTIN Forwarding Engine Processor QXM 0 REV 06 711-028408 ZW4288 MPC QXM FPC 0 BUILTIN BUILTIN MPC BUILTIN MIC 0 BUILTIN BUILTIN 4x 10GE XFP PIC 0 BUILTIN BUILTIN 4x 10GE XFP Xcvr 0 REV 02 740-014289 C825XU010 XFP-10G-SR Xcvr 1 REV 03 740-014289 CB25BQ0WD XFP-10G-SR Xcvr 2 REV 01 740-011571 C739XJ039 XFP-10G-SR FPC 1 BUILTIN BUILTIN MPC BUILTIN MIC 1 *** Hardware Not Supported *** Fan Tray Fan TrayĪ pipe filter of | match "FPC-1" displays the following Specifies a range of letters or digits to match. Used at the end of an expression to denote that a term must be matched exactly up Used at the beginning of an expression to denote where a match should begin. Indicates that a match can be one of the two terms on either side of the pipe. Table 1: Common Regular Expression Operators in Operational Mode Commands For example: command | match regular-expression | save filename You can enter any of the pipe filters in combination. Question mark to display an additional compare filter: show configuration | ?Ĭompare Compare configuration changes with prior version Trim Trim specified number of columns from start of lineįor the show configuration command only, you can combine the pipe symbol and Refresh Refresh a continuous display of the command Match Show only text that matches a pattern Hold Hold text without exiting the -More- prompt The following example lists the filters that you can use with the pipe symbol ( | ): show interfaces | show interfaces | ?ĭisplay Show additional kinds of informationĮxcept Show only text that does not match a patternįind Search for first occurrence of pattern Logical-system Name of logical system, or 'all' You can filter command output by adding the pipe ( | ) symbol when you enter the
