Re: Why grep still exists?
>>>>> "j" == jqdkf <jqdkf@zju.edu.cn> writes:
j> Hi,
j> I'm just wondering why grep still exists in every distribution of UNIX
j> or UNIX like system. As egrep can support a full featured regular
j> expression, it is much more powerful than grep. Is it only for backport
j> support?
Debian includes GNU grep, which takes the place of vanilla grep,
egrep, and fgrep.
jdb@bigbox:~$ ls -l /bin | grep grep
-rwxr-xr-x 1 root root 33 Apr 21 12:02 egrep
-rwxr-xr-x 1 root root 33 Apr 21 12:02 fgrep
-rwxr-xr-x 1 root root 67948 Apr 21 12:02 grep
-rwxr-xr-x 3 root root 2944 Apr 16 14:35 zegrep
-rwxr-xr-x 3 root root 2944 Apr 16 14:35 zfgrep
-rwxr-xr-x 3 root root 2944 Apr 16 14:35 zgrep
jdb@bigbox:~$ cat /bin/[ef]grep
#!/bin/sh
exec grep -E ${1+"$@"}
#!/bin/sh
exec grep -F ${1+"$@"}
--Joe
--
Joseph Barillari -- http://barillari.org
Reply to: