Pipe/Match - Alcatel-Lucent 7450 ESS-12 Configuration Manual

Os basic system 7450 ess series ethernet service switch
Table of Contents

Advertisement

Pipe/Match

The SR OS supports the pipe feature to search one or more files for a given character string or
pattern.
Note: When using the pipe/match command the variables and attributes must be spelled correctly.
The attributes following the command and must come before the expression/pattern. The
following displays examples of the pipe/match command to complete different tasks:
Command syntax:
match pattern context {parents | children | all} [ignore-case] [max-count lines-count]
[expression]
match pattern [ignore-case] [invert-match] [pre-lines pre-lines] [post-lines lines-count] [max-
count lines-count] [expression]
where:
pattern
context
parents
children
all
ignore-case
max-count
lines-count
expression
invert-match
pre-lines
pre-lines
post-lines
lines-count
For example:
A:Dut-C# show log log-id 98 | match ignore-case "sdp bind"
7450 ESS OS Basic System Configuration Guide
Task: Capture all the lines that include "echo" and redirect the output to a file on the
compact flash:
admin display-config | match "echo" > cf1:\test\echo_list.txt
Task: Display all the lines that do not include "echo":
admin display-config | match invert-match "echo"
Task: Display the first match of "vpls" in the configuration file:
admin display-config | match max-count 1 "vpls"Task: Display everything in the
configuration after finding the first instance of "interface":
admin display-config | match post-lines 999999 interface
string or regular expression
keyword:
display context associated with the matching line
keyword:
display parent context information
keyword:
display child context information
keyword:
display both parent and child context information
keyword
keyword:
display only a specific number of instances of matching lines
1 — 2147483647
keyword:
pattern is interpreted as a regular expression
keyword
keyword:
display some lines prior to the matching line
0 — 100
keyword:
display some lines after the matching line
1 — 2147483647
CLI Usage
Page 39

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

7450 ess-67450 ess-7

Table of Contents