File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ find(sub{ -d or unlink or die $! },
29
29
30
30
# bootstrap initial three indexes
31
31
status(' net-snmp:rfc' );
32
- system (q( snmptranslate -IR sysName | egrep -v '^SNMPv2-MIB::sysName$') );
32
+ system (q( snmptranslate -IR sysName | grep -E -v '^SNMPv2-MIB::sysName$') );
33
33
34
34
# now for all the other dirs
35
35
my $next = 2;
@@ -42,7 +42,7 @@ foreach (sort map {(splitdir($_))[-1]} grep {-d} glob("$ENV{MIBHOME}/*")) {
42
42
43
43
$ENV {SNMP_PERSISTENT_DIR } = $tmpdir -> dirname;
44
44
qx( snmptranslate -IR sysName 2>&1 >/dev/null) ;
45
- system (qq( snmptranslate -M'$newmibdirs ' -IR sysName | egrep -v '^SNMPv2-MIB::sysName\$ ') );
45
+ system (qq( snmptranslate -M'$newmibdirs ' -IR sysName | grep -E -v '^SNMPv2-MIB::sysName\$ ') );
46
46
$ENV {SNMP_PERSISTENT_DIR } = " $ENV {MIBHOME}/EXTRAS/indexes" ;
47
47
48
48
copy(" $tmpdir /mib_indexes/2" , " $ENV {SNMP_PERSISTENT_DIR}/mib_indexes/$next " );
@@ -66,7 +66,7 @@ find(sub{
66
66
67
67
# copy over sorted content of the index
68
68
my $dest = " $ENV {SNMP_PERSISTENT_DIR}/cache/$vendor " ;
69
- system (qq( egrep -v '^DIR ' '$_ ' | sort -dfs > '$dest ') ) and die ($? >> 8);
69
+ system (qq( grep -E -v '^DIR ' '$_ ' | sort -dfs > '$dest ') ) and die ($? >> 8);
70
70
71
71
# copy the cache *back* to the index so the index is properly sorted
72
72
system (qq( echo 'DIR $ENV {MIBHOME}/$vendor ' > '$_ ') ) and die ($? >> 8);
Original file line number Diff line number Diff line change @@ -93,9 +93,9 @@ foreach my $mib (sort keys %{$file_for}) {
93
93
my $shortoldfile = catfile((splitdir($oldfile ))[-2,-1]);
94
94
95
95
# Look for version numbers - https://tools.ietf.org/html/rfc2578
96
- my $oldv = max(qx( egrep -A1 '(REVISION|LAST-UPDATED)' '$oldfile ')
96
+ my $oldv = max(qx( grep -E -A1 '(REVISION|LAST-UPDATED)' '$oldfile ')
97
97
=~ m / "(\d {10}|\d {12})Z?"/ g );
98
- my $newv = max(qx( egrep -A1 '(REVISION|LAST-UPDATED)' '$newmibfile ')
98
+ my $newv = max(qx( grep -E -A1 '(REVISION|LAST-UPDATED)' '$newmibfile ')
99
99
=~ m / "(\d {10}|\d {12})Z?"/ g );
100
100
101
101
if ($oldv and $newv ) {
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ foreach my $f (@new_files) {
27
27
if ($d !~ / ^\s *$ / ) {
28
28
print " $f diffs. \n " unless $d eq ' 1' ;
29
29
# Look for version numbers
30
- print " OLD: " ,` egrep -A 1 '(REVISION|LAST-UPDATED)' $dir_old /$file ` ;
31
- print " NEW: " ,` egrep -A 1 '(REVISION|LAST-UPDATED)' $dir_new /$file ` ;
30
+ print " OLD: " ,` grep -E -A 1 '(REVISION|LAST-UPDATED)' $dir_old /$file ` ;
31
+ print " NEW: " ,` grep -E -A 1 '(REVISION|LAST-UPDATED)' $dir_new /$file ` ;
32
32
print ` cp -f $f $dir_old ` if $copy ;
33
33
print " \n " ;
34
34
}
You can’t perform that action at this time.
0 commit comments