108
MDS Orbit MCR-4G Technical Manual
MDS 05-6628A01, Rev. B
For example:
admin@(none) 00:24:37> show interfaces | 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
[ok][2012-06-19 00:24:43]
admin@(none) 00:24:43>
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:
For example, to only display
uid
and
gid
you can do the following:
admin@io 15:11:24> show configuration | match "(uid)|(gid)"
uid 1000;
gid 100;
uid 1000;
gid 100;
uid 1000;
gid 100;
uid 1000;
gid 100;
Display line numbers
The linnum target causes a line number to be displayed at the beginning of each line in the display.
admin@io 15:11:24> show configuration | match "(uid)|(gid)" | linnum
1: uid 1019;
2: gid 1013;
3: uid 1019;
4: gid 1013;
5: uid 1019;
6: gid 1013;
.
Matches any character.
^
Matches the beginning of a string.
$
Matches the end of a string.
[abc...]
Character class, which matches any of the characters abc... Character ranges are
specified by a pair of characters separated by a -
[^abc...]
negated character class, which matches any character except abc....
r1 | r2
Alternation. It matches either r1 or r2.
r1r2
Concatenation. It matches r1 and then r2.
r+
Matches one or more rs.
r*
Matches zero or more rs.
r?
Matches zero or one rs.
(r)
Grouping. It matches r.