egrep, fgrep: go back to shell scripts(2014-03-23)

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=b639643840ef506594b6c46e5b24d9980a33e78e

CentOS Linux release 7.4.1708 (Core)

$ more /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core) 


egrep

$ more /usr/bin/egrep 
#!/bin/sh
grep=grep
unset _EXECOPT _GREPOPT
case $0 in
  */*)
    dir=${0%/*}
    if test -x "$dir/grep"; then
      PATH=$dir:$PATH
      grep=grep
    fi;;
esac
if [ "$GREP_LEGACY_EGREP_FGREP_PS" = 1 ]; then
  _EXECOPT="-a egrep"
else
  _GREPOPT=-E
fi
exec $_EXECOPT $grep $_GREPOPT "$@"


fgrep

$ more /usr/bin/fgrep
#!/bin/sh
grep=grep
unset _EXECOPT _GREPOPT
case $0 in
  */*)
    dir=${0%/*}
    if test -x "$dir/grep"; then
      PATH=$dir:$PATH
      grep=grep
    fi;;
esac
if [ "$GREP_LEGACY_EGREP_FGREP_PS" = 1 ]; then
  _EXECOPT="-a fgrep"
else
  _GREPOPT=-F
fi
exec $_EXECOPT $grep $_GREPOPT "$@"

Ubuntu 16.04.3 LTS

@DESKTOP-J46UVNU:/mnt/c/Windows/System32$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial


egrep

@DESKTOP-J46UVNU:/mnt/c/Windows/System32$ more /bin/egrep
#!/bin/sh
exec grep -E "$@"


fgrep

@DESKTOP-J46UVNU:/mnt/c/Windows/System32$ more /bin/fgrep
#!/bin/sh
exec grep -F "$@"