mbox series

[0/1] Replace obsolete grep aliases

Message ID 20220605040845.854206-1-sam@gentoo.org
Headers show
Series Replace obsolete grep aliases | expand

Message

Sam James June 5, 2022, 4:08 a.m. UTC
We could use an autoconf macro to check if 'grep -E', 'grep -F' exist and
define it to the appropriate value (AC_PROG_EGREP etc) but I don't see the value
given any remotely modern GNU grep supports it.

It looks like it was first required by POSIX in 2001.

Sam James (1):
  */*: egrep -> grep -E, fgrep -> grep -F

 Makefile                       |  4 +--
 aclocal.m4                     |  2 +-
 elf/Makefile                   |  2 +-
 elf/tst-rtld-list-tunables.sh  |  2 +-
 iconvdata/big5.c               | 30 +++++++++++-----------
 iconvdata/cns11643.c           | 26 +++++++++----------
 iconvdata/cns11643l1.c         | 46 +++++++++++++++++-----------------
 iconvdata/gb2312.c             | 34 ++++++++++++-------------
 iconvdata/gbk.c                | 24 +++++++++---------
 iconvdata/jis0208.c            | 14 +++++------
 iconvdata/jis0212.c            |  8 +++---
 iconvdata/ksc5601.c            | 12 ++++-----
 iconvdata/sjis.c               | 14 +++++------
 iconvdata/uhc.c                |  4 +--
 io/ftwtest-sh                  |  2 +-
 manual/libc-texinfo.sh         |  2 +-
 po/Makefile                    |  4 +--
 scripts/check-c++-types.sh     |  4 +--
 scripts/documented.sh          |  4 +--
 sysdeps/arm/configure          |  2 +-
 sysdeps/arm/configure.ac       |  2 +-
 sysdeps/i386/configure         |  2 +-
 sysdeps/i386/tst-ld-sse-use.sh |  6 ++---
 sysdeps/ia64/fpu/import_check  |  4 +--
 24 files changed, 127 insertions(+), 127 deletions(-)

Comments

Paul Eggert June 5, 2022, 5:10 p.m. UTC | #1
On 6/4/22 21:08, Sam James via Libc-alpha wrote:
> It looks like it was first required by POSIX in 2001.

Yes, it is safe nowadays to use 'grep -E' instead of egrep. The only 
vendor-supported platform I know of where '/usr/bin/grep -E' does not 
work is Solaris 10 (end-of-life January 2024), and that's easily fixed 
by prepending /usr/xpg4/bin to PATH.

By the way, does glibc assume GNU grep? For example, 
manual/check-safety.sh uses grep BREs with \| and \], both of which are 
GNU extensions to POSIX. If this sort of thing is intended, INSTALL 
should mention GNU or GNU-compatible grep under "Recommended Tools for 
Compilation"; if not, glibc should stop assuming POSIX extensions like 
\| and \] in its usage of build tools.