398 MDS Orbit MCR/ECR Technical Manual MDS 05-6632A01, Rev. F
linnum - Enumerate lines in the output
match - Show only text that matches a pattern
match-all - All selected filters must match
match-any - At least one filter must match
more - Paginate output
nomore - Suppress pagination
select - Select additional columns
tab - Enforce table output
tags - Show only statements whose tags matches a pattern
until - Display until the first occurrence of a pattern
admin@(none) 17:20:27> show configuration |
6.9 Count the Number of Lines in the Output
This redirect target counts the number of lines in the output. For example:
> show configuration | count
[ok][2007-08-31 13:49:44]
Count: 99 lines
> show configuration interfaces | count
[ok][2007-08-31 13:50:12]
Count: 90 lines
6.10 Search for a String in the Output
The match target is used to only include lines matching a regular expression. For example:
> show configuration logging | match date
event-rules date_time_from_ntp {
event-rules date_time_from_user {
event-rules date_time_not_set {
In the example above only lines containing “date” are shown. Similarly lines not containing a regular
expression can be included.
> show interface-state | except counters
interfaces supported-interfaces bridge true
interfaces interface eth0
if-index 2
status mac-address 1e:ed:19:27:1a:b3
status mtu 1500
status link up
status ipv4 address [ 192.168.1.10/24 ]
status ipv6 address [ fe80::1ced:19ff:fe27:1ab3/64 ]
It is also possible to display the output starting at the first match of a regular expression, using the find
target. For example:
> show interface-state | find tx
status counters tx_aborted_errors 0
status counters tx_bytes 238574
status counters tx_carrier_errors 0
status counters tx_compressed 0
status counters tx_dropped 0
status counters tx_errors 0
status counters tx_fifo_errors 0
status counters tx_heartbeat_errors 0