Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:alsoft:LFS
bzip2
0001-bzgrep_use_grep-E_-F_instead-of-egrep-and-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-bzgrep_use_grep-E_-F_instead-of-egrep-and-fgrep.patch of Package bzip2
From 1ea1ac188ad4b9cb662e3f8314673c63df95a589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi> Date: Sat, 13 Nov 2021 08:44:09 +0200 Subject: [PATCH] bzgrep, build: use `grep -E/-F` instead of `egrep` and `fgrep` `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 --- CMakeLists.txt | 2 +- bzgrep | 6 +++--- docs/meson.build | 2 +- docs/xmlproc.sh | 2 +- man/bzgrep.1 | 16 ++++++++-------- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bzgrep b/bzgrep index 0314ca6..cd29ba8 100644 --- a/bzgrep +++ b/bzgrep @@ -10,8 +10,8 @@ PATH="/usr/bin:$PATH"; export PATH prog=`echo $0 | sed 's|.*/||'` case "$prog" in - *egrep) grep=${EGREP-egrep} ;; - *fgrep) grep=${FGREP-fgrep} ;; + *egrep) grep=${EGREP-grep -E} ;; + *fgrep) grep=${FGREP-grep -F} ;; *) grep=${GREP-grep} ;; esac pat="" @@ -19,7 +19,7 @@ while test $# -ne 0; do case "$1" in -e | -f) opt="$opt $1"; shift; pat="$1" if test "$grep" = grep; then # grep is buggy with -e on SVR4 - grep=egrep + grep="grep -E" fi;; -A | -B) opt="$opt $1 $2"; shift;; -*) opt="$opt $1";; diff --git a/xmlproc.sh b/xmlproc.sh index 09c24ad..1463117 100755 --- a/xmlproc.sh +++ b/xmlproc.sh @@ -74,7 +74,7 @@ case $action in flags='--noout --xinclude --noblanks --postvalid' dtd='--dtdvalid http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd' xmllint $flags $dtd $xmlfmtfile 2> $OUT - egrep 'error' $OUT + grep -F 'error' $OUT rm $OUT ;; diff --git a/bzgrep.1 b/bzgrep.1 index 930af8c..c99e3be 100644 --- a/bzgrep.1 +++ b/bzgrep.1 @@ -5,17 +5,17 @@ bzgrep, bzfgrep, bzegrep \- search possibly bzip2 compressed files for a regular expression .SH SYNOPSIS .B bzgrep -[ grep_options ] +[ grep options ] .BI [\ -e\ ] " pattern" .IR filename ".\|.\|." .br .B bzegrep -[ egrep_options ] +[ grep -E options ] .BI [\ -e\ ] " pattern" .IR filename ".\|.\|." .br .B bzfgrep -[ fgrep_options ] +[ grep -F options ] .BI [\ -e\ ] " pattern" .IR filename ".\|.\|." .SH DESCRIPTION @@ -36,9 +36,9 @@ is invoked as or .I bzfgrep then -.I egrep +.I grep -E or -.I fgrep +.I grep -F is used instead of .I grep. If the GREP environment variable is set, @@ -47,10 +47,10 @@ uses it as the .I grep program to be invoked. For example: - for sh: GREP=fgrep bzgrep string files - for csh: (setenv GREP fgrep; bzgrep string files) + for sh: GREP="grep -F" bzgrep string files + for csh: (setenv GREP "grep -F"; bzgrep string files) .SH AUTHOR Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. .SH "SEE ALSO" -grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1) +grep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1) -- GitLab
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor