Need unix command file HELP!

mo at wgivax.UUCP mo at wgivax.UUCP
Thu Feb 27 21:39:51 AEST 1986


>Reply-To: dv at well.UUCP (David W. Vezie)

>In article <144 at wgivax.UUCP> mo at wgivax.UUCP writes:
>>WRONG!  fgrep -l WILL print the file name, and WILL NOT print the string
>>        it will look for ONLY the first occurrence in a file, speeding
>>		things up, AND fgrep is faster than grep
>>

>Ummm...  I don't know about your machine, but I just did an informal
>benchmark comparing {e,,f}grep for speed, and found out that of the
>three, egrep is fastest, followed by grep, and slowest was fgrep.
>(this is on 4.2BSD)

I haven't used egrep very much, but having worked with UNIX for 5 years
on Vax 11/780's, Sun's, Masscomp's, and various other 68k machines (mostly
4.[12]), I have always observed (-: yes, this is a subjective observation :-)
that fgrep runs faster than grep when searching for a specific string.

Anyway, the point is that the grep family of commands has an option which
will print out the file name, and not the lines in which the pattern occurs.

Let's avoid a holy war.  The point in this entire back and forth discussion
is RTFM!!!!  There have been many mistakes in the postings responding to
the original article.  It's great to want to help, but be sure that you have
all the facts before giving advice.



More information about the Comp.unix mailing list