diff options
author | Rene Engelhard <rene@debian.org> | 2022-09-07 21:34:42 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2022-09-08 14:43:53 +0200 |
commit | fd42cea5f301a10cdeaa29959f04b111de534132 (patch) | |
tree | 0bfa9e9f22d63dcbb6eeafc6002752d9ff20399e | |
parent | 09e499e64ec4acb24c9524c8aacabc6182124442 (diff) |
replace egrep/fgrep calls with grep -E/grep -F
as egrep/fgrep is deprecated since long amd grep 3.8+ now actually warns
(e.g. "egrep: warning: egrep is obsolescent; using grep -E")
Change-Id: I5b10f05dffdd09081deb05cef974e3cdb2907315
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139614
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rwxr-xr-x | .git-hooks/commit-msg | 4 | ||||
-rwxr-xr-x | android/source/gradlew | 4 | ||||
-rwxr-xr-x | bin/find-german-comments | 2 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rwxr-xr-x | odk/config/configure.pl | 4 | ||||
-rw-r--r-- | slideshow/qa/debug/nodetree.sh | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/.git-hooks/commit-msg b/.git-hooks/commit-msg index eebca62cb6f7..950a6b709d9a 100755 --- a/.git-hooks/commit-msg +++ b/.git-hooks/commit-msg @@ -49,8 +49,8 @@ if [ "$len" -gt 79 ] ; then fi fdo_regex='fdo#[0-9]+' -if egrep -q "$fdo_regex" $1; then - for bugid in `head -n 1 $1 |egrep -o "$fdo_regex" |sed 's/fdo#//'` +if grep -E -q "$fdo_regex" $1; then + for bugid in `head -n 1 $1 | grep -E -o "$fdo_regex" |sed 's/fdo#//'` do if [ "`echo $bugid |sed 's/fdo#//'`" -gt 88775 ]; then abort "$1" "The first line contains a suspicious fdo# rereference: 'fdo#$bugid', did you mean tdf#?" diff --git a/android/source/gradlew b/android/source/gradlew index 91a7e269e19d..b7029853b09f 100755 --- a/android/source/gradlew +++ b/android/source/gradlew @@ -130,8 +130,8 @@ if $cygwin ; then # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + CHECK=`echo "$arg"|grep -E -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|grep -E -c "^-"` ### Determine if an option if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` diff --git a/bin/find-german-comments b/bin/find-german-comments index a38b435ce870..175af6f22420 100755 --- a/bin/find-german-comments +++ b/bin/find-german-comments @@ -235,7 +235,7 @@ class Parser: # Change into the given dir, so "git ls-tree" does work. os.chdir(directory) - sock = os.popen(r"git ls-tree -r HEAD --name-only |egrep '\.(c|cc|cpp|cxx|h|hxx|mm)$'") + sock = os.popen(r"git ls-tree -r HEAD --name-only | grep -E '\.(c|cc|cpp|cxx|h|hxx|mm)$'") lines = sock.readlines() sock.close() diff --git a/configure.ac b/configure.ac index 7b03df8ee0aa..7c82578933cb 100644 --- a/configure.ac +++ b/configure.ac @@ -2945,7 +2945,7 @@ AC_SUBST(GNUPARALLEL) AC_MSG_CHECKING([for GNU or BSD tar]) for a in $GNUTAR gtar gnutar tar bsdtar /usr/sfw/bin/gtar; do - $a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null + $a --version 2> /dev/null | grep -E "GNU|bsdtar" 2>&1 > /dev/null if test $? -eq 0; then GNUTAR=$a break @@ -2958,11 +2958,11 @@ fi AC_SUBST(GNUTAR) AC_MSG_CHECKING([for tar's option to strip components]) -$GNUTAR --help 2> /dev/null | egrep "bsdtar|strip-components" 2>&1 >/dev/null +$GNUTAR --help 2> /dev/null | grep -E "bsdtar|strip-components" 2>&1 >/dev/null if test $? -eq 0; then STRIP_COMPONENTS="--strip-components" else - $GNUTAR --help 2> /dev/null | egrep "strip-path" 2>&1 >/dev/null + $GNUTAR --help 2> /dev/null | grep -E "strip-path" 2>&1 >/dev/null if test $? -eq 0; then STRIP_COMPONENTS="--strip-path" else diff --git a/odk/config/configure.pl b/odk/config/configure.pl index f3d0e08b3440..756db5a3c76b 100755 --- a/odk/config/configure.pl +++ b/odk/config/configure.pl @@ -242,7 +242,7 @@ while ( (!$main::correctVersion) && } else { #check version - my $testVersion = `$OO_SDK_ZIP_HOME/zip -h 2>&1 | egrep Zip | head -n 1`; + my $testVersion = `$OO_SDK_ZIP_HOME/zip -h 2>&1 | grep -E Zip | head -n 1`; $testVersion =~ s#Zip ([\d.]+) .*#$1#go; if ( $testVersion eq "") { @@ -414,7 +414,7 @@ while ( (!$main::correctVersion) && } else { #check version - my $testVersion = `$main::OO_SDK_JAVA_HOME/bin/java -version 2>&1 | egrep "java version" | head -n 1 | sed -e 's#.*version "##' | sed -e 's#".*##'`; + my $testVersion = `$main::OO_SDK_JAVA_HOME/bin/java -version 2>&1 | grep -E "java version" | head -n 1 | sed -e 's#.*version "##' | sed -e 's#".*##'`; $testVersion =~ s#([^\n]+)\n#$1#go; $main::correctVersion = testVersion($main::javaVersion, $testVersion, "$main::OO_SDK_JAVA_HOME/bin/java", 1); diff --git a/slideshow/qa/debug/nodetree.sh b/slideshow/qa/debug/nodetree.sh index 7105ff181d81..78546cb8ce0b 100644 --- a/slideshow/qa/debug/nodetree.sh +++ b/slideshow/qa/debug/nodetree.sh @@ -34,7 +34,7 @@ # ################################################### -egrep "Node connection|Node state" $1 | \ +grep -E "Node connection|Node state" $1 | \ sed -e '/Node state/ s/.*Node state.*: \(.*\)/\1/' \ -e '/Node connection/ s/.*Node connection.*: \(n.*\)/\1/' | \ \ |