]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
xzgrep: use `grep -E/-F` instead of `egrep` and `fgrep`
authorVille Skyttä <ville.skytta@iki.fi>
Sat, 13 Nov 2021 08:11:57 +0000 (10:11 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Sat, 13 Nov 2021 16:17:33 +0000 (18:17 +0200)
`egrep` and `fgrep` have been deprecated in GNU grep since 2007, and in
current post 3.7 Git they have been made to emit obsolescence warnings:
https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1

src/scripts/xzgrep.1
src/scripts/xzgrep.in

index 3ac4fadbec32cf7680618cb0f91fad42a6c19a45..dcbd031694c6ff81a5e7643e83a90203aa7b2c71 100644 (file)
@@ -67,9 +67,9 @@ is invoked as
 or
 .B xzfgrep
 then
-.BR egrep (1)
+.B grep \-E
 or
-.BR fgrep (1)
+.B grep \-F
 is used instead of
 .BR grep (1).
 The same applies to names
@@ -87,9 +87,9 @@ environment variable is set,
 .B xzgrep
 uses it instead of
 .BR grep (1),
-.BR egrep (1),
+.BR "grep \-E" ,
 or
-.BR fgrep (1).
+.BR "grep \-F" .
 .SH "SEE ALSO"
 .BR grep (1),
 .BR xz (1),
index baec826e52fc971c570c16a7a5c73ffaa036e154..b180936c808ca861ad9058528740231c0a1c5713 100644 (file)
@@ -29,8 +29,8 @@ xz='@xz@ --format=auto'
 unset GZIP BZIP BZIP2 LZOP
 
 case ${0##*/} in
-  *egrep*) prog=xzegrep; grep=${GREP:-egrep};;
-  *fgrep*) prog=xzfgrep; grep=${GREP:-fgrep};;
+  *egrep*) prog=xzegrep; grep=${GREP:-grep -E};;
+  *fgrep*) prog=xzfgrep; grep=${GREP:-grep -F};;
   *)       prog=xzgrep; grep=${GREP:-grep};;
 esac