MDS 05-6632A01, Rev. F MDS Orbit MCR/ECR Technical Manual 399
status counters tx_packets 1731
status counters tx_window_errors 0
Output can also be ended when a line matches a regular expression. This is done with the until target. For
example:
> show interface-state | find tx | until compressed
status counters tx_aborted_errors 0
status counters tx_bytes 250246
status counters tx_carrier_errors 0
status counters tx_compressed 0
6.11 Regular Expressions
The regular expressions is a subset of the regular expressions found in egrep and in the AWK
programming language. Some common operators are:
Matches the beginning of a string.
Matches the end of a string.
Character class, which matches any of the characters abc...
Character ranges are specified by a pair of characters separated by a -
negated character class, which matches any character except abc....
Alternation. It matches either r1 or r2.
Concatenation. It matches r1 and then r2.
For example, to only display uid and gid you can do the following:
> show configuration | match "(uid) | (gid)"
uid 1000;
gid 100;
uid 1000;
gid 100;
uid 1000;
gid 100;
uid 1000;
gid 100;
6.12 Display Line Numbers
The linnum target causes a line number to be displayed at the beginning of each line in the display.
> show configuration | match "(uid) | (gid)" | linnum
1: uid 1019;
2: gid 1013;
3: uid 1019;
4: gid 1013;
5: uid 1019;
6: gid 1013;
7: uid 1019;