From: "Darrick J. Wong" <djwong@kernel.org>
To: Zorro Lang <zlang@kernel.org>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] common/rc: replace obsolescent egrep and fgrep
Date: Wed, 14 Sep 2022 10:57:55 -0700 [thread overview]
Message-ID: <YyIWI8+OURMPIkLe@magnolia> (raw)
In-Reply-To: <20220913093345.84370-1-zlang@kernel.org>
On Tue, Sep 13, 2022 at 05:33:45PM +0800, Zorro Lang wrote:
> Due to the change in grep project:
> a95156247098 ("egrep, fgrep: now obsolete")
>
> some tests start to fail on latest Fedora system with grep-3.8-1.fc38
> or newer version, as:
>
> generic/447 70s ... egrep: warning: egrep is obsolescent; using grep -E
> ...
> @@ -1,4 +1,5 @@
> QA output created by 447
> +egrep: warning: egrep is obsolescent; using grep -E
> ...
>
> So use grep -E and -F to instead of egrep and fgrep commands.
>
> Signed-off-by: Zorro Lang <zlang@kernel.org>
> ---
> common/rc | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/common/rc b/common/rc
> index a25cbcd0..dee3965e 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -30,6 +30,17 @@ dd()
> fi
> }
>
> +# The egrep and fgrep are obsolescent
> +egrep()
> +{
> + grep -E "$@"
> +}
> +
> +fgrep()
> +{
> + grep -F "$@"
> +}
Why not conditionally define these *only* if the system doesn't already
have an egrep/fgrep binary?
(Alternately I guess you could take Murphy's patch, since that's the
proper fix according to the gnu grep maintainers...)
--D
> +
> # Prints the md5 checksum of a given file
> _md5_checksum()
> {
> --
> 2.31.1
>
next prev parent reply other threads:[~2022-09-14 17:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 9:33 [PATCH] common/rc: replace obsolescent egrep and fgrep Zorro Lang
2022-09-13 12:27 ` David Disseldorp
2022-09-13 12:52 ` Zorro Lang
2022-09-14 17:57 ` Darrick J. Wong [this message]
2022-09-15 3:39 ` Zorro Lang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YyIWI8+OURMPIkLe@magnolia \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=zlang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.