[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use of deprecated 'egrep' and 'fgrep'
From: |
Sam James |
Subject: |
Re: Use of deprecated 'egrep' and 'fgrep' |
Date: |
Thu, 29 Sep 2022 00:23:36 +0100 |
> On 29 Sep 2022, at 00:16, Thomas Dickey <dickey@his.com> wrote:
>
> On Wed, Sep 28, 2022 at 09:08:28PM +0100, Sam James wrote:
>> Hi,
>>
>> grep 3.8 emits deprecation warnings for both 'egrep' and 'fgrep',
>> telling users to switch to 'grep -E' and 'grep -F' respectively.
>
> yes... I noticed this recently (in test-builds for xterm, e.g.,
> Fedora Rawhide), though I began working around it early this year.
>
> Having had no copies of 3.8 in the wild, there'll be spots that I overlooked.
> Most of those are in configure macros and external scripts.
>
> I'll tidy up that, of course.
>
Thanks!
In case it's helpful, here's what the wrappers look like:
````
$ cat /usr/bin/egrep
#!/bin/sh
cmd=${0##*/}
echo "$cmd: warning: $cmd is obsolescent; using /bin/grep -E" >&2
exec /bin/grep -E "$@"
$ cat /usr/bin/fgrep
#!/bin/sh
cmd=${0##*/}
echo "$cmd: warning: $cmd is obsolescent; using /bin/grep -F" >&2
exec /bin/grep -F "$@"
```
May be useful to put in PATH temporarily or something.
Best,
sam
signature.asc
Description: Message signed with OpenPGP