1
2
3
"The number of excessive collisions, incremented for each
frame that experienced 16 collisions during transmission and
was aborted."
/".*"/s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
testing > cat t.pl
#! /usr/bin/perl
use strict;
use warnings;
my $mibtext = '"The number of excessive collisions, incremented for each
frame that experienced 16 collisions during transmission and
was aborted."';
if ( $mibtext =~ m/".*"/s ) {
print "MATCH\n";
}
testing > perl t.pl
MATCH
perl -00 -wnl -e '/OIDNAME OBJECT-TYPE/ and print;' mibfile.txt | perl -wnl -e '/".*"/s and print;'
1
2
3
4
5
6
7
8
axInterfaceStatErrorsIn OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of received packets that are either undersized,
oversized, or have FCS errors."
::= { axInterfaceStatEntry 8 }
1
2
3
4
5
6
$ perl -00 -wnl -e '/\S+ OBJECT-TYPE/ and print;' mib.txt | perl -00 -wnl -e '/(".*")/s and print $1;'
"The number of received packets that are either undersized,
oversized, or have FCS errors."
"The number of received packets that are either undersized,
oversized, or have FCS errors."
mib.txtCode: (dl )1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17foo OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of received packets that are either undersized,
oversized, or have FCS errors."
::= { foo 8 }
bar OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of received packets that are either undersized,
oversized, or have FCS errors."
::= { bar 8 }