diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-08-15 10:52:13 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-08-16 10:12:29 -0700 |
commit | a9515624709865d480e3142fd959bccd1c9372d1 (patch) | |
tree | 64b52c276984353357587c85d31b1056d259b725 /src | |
parent | e87ccc7038d4f44f4601b3e8775fef09b1420dff (diff) | |
download | grep-a9515624709865d480e3142fd959bccd1c9372d1.tar.gz |
egrep, fgrep: now obsolete
* NEWS: Mention this (see bug#49996).
* doc/Makefile.am (egrep.1 fgrep.1): Remove. All uses removed.
* doc/grep.in.1, doc/grep.texi (grep Programs):
Remove documentation for egrep, fgrep.
* doc/grep.texi (Usage): Add FAQ for egrep and fgrep.
* src/Makefile.am (shell_does_substrings): Substitute for ${0##*/},
not for ${0%/\*} (which was not being used anyway).
* src/egrep.sh: Issue an obsolescence warning.
* tests/fedora: Use "grep -F" instead of "fgrep" in diagnostics,
as this tests "grep -F" not "fgrep".
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/egrep.sh | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index c2e6e9a4..db1bb3f6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -54,11 +54,11 @@ EXTRA_DIST = egrep.sh egrep fgrep: egrep.sh Makefile $(AM_V_GEN)grep=`echo grep | sed -e '$(transform)'` && \ case $@ in egrep) option=-E;; fgrep) option=-F;; esac && \ - shell_does_substrings='set x/y && d=$${1%/*} && test "$$d" = x' && \ + shell_does_substrings='set x/y && d=$${1##*/} && test "$$d" = y' && \ if $(SHELL) -c "$$shell_does_substrings" 2>/dev/null; then \ edit_substring='s,X,X,'; \ else \ - edit_substring='s,\$${0%/\*},`expr "X$$0" : '\''X\\(.*\\)/'\''`,g'; \ + edit_substring='s,\$${0##\*/},`expr "X$$0" : '\''X\\(.*\\)/'\''`,g'; \ fi && \ sed -e 's|[@]SHELL@|$(SHELL)|g' \ -e "$$edit_substring" \ diff --git a/src/egrep.sh b/src/egrep.sh index 6d6c15a8..a0d1694e 100644 --- a/src/egrep.sh +++ b/src/egrep.sh @@ -1,2 +1,4 @@ #!@SHELL@ +cmd=${0##*/} +echo "$cmd: warning: $cmd is obsolescent; using @grep@ @option@" >&2 exec @grep@ @option@ "$@" |