Skip to content

Commit f3b1b13

Browse files
authored
change from egrep to grep -E (#262)
was deprecated by GNU
1 parent ad87d59 commit f3b1b13

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

EXTRAS/scripts/oldstyle/mkindex2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ find(sub{ -d or unlink or die $! },
2929

3030
# bootstrap initial three indexes
3131
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$'));
3333

3434
# now for all the other dirs
3535
my $next = 2;
@@ -42,7 +42,7 @@ foreach (sort map {(splitdir($_))[-1]} grep {-d} glob("$ENV{MIBHOME}/*")) {
4242

4343
$ENV{SNMP_PERSISTENT_DIR} = $tmpdir->dirname;
4444
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\$'));
4646
$ENV{SNMP_PERSISTENT_DIR} = "$ENV{MIBHOME}/EXTRAS/indexes";
4747

4848
copy("$tmpdir/mib_indexes/2", "$ENV{SNMP_PERSISTENT_DIR}/mib_indexes/$next");
@@ -66,7 +66,7 @@ find(sub{
6666

6767
# copy over sorted content of the index
6868
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);
7070

7171
# copy the cache *back* to the index so the index is properly sorted
7272
system(qq(echo 'DIR $ENV{MIBHOME}/$vendor' > '$_')) and die ($? >> 8);

EXTRAS/scripts/prepmibs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ foreach my $mib (sort keys %{$file_for}) {
9393
my $shortoldfile = catfile((splitdir($oldfile))[-2,-1]);
9494

9595
# 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')
9797
=~ 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')
9999
=~ m/"(\d{10}|\d{12})Z?"/g);
100100

101101
if ($oldv and $newv) {

EXTRAS/scripts/util/diff_dir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ foreach my $f (@new_files) {
2727
if ($d !~ /^\s*$/) {
2828
print "$f diffs. \n" unless $d eq '1';
2929
# 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`;
3232
print `cp -f $f $dir_old` if $copy;
3333
print "\n";
3434
}

0 commit comments

Comments
 (0)