Re: fgrep,grep and egrep

In article <d8cbd965-3be1-4c65-b97f-b1a17072227a@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Ed Morton <mortonspam@xxxxxxxxx> wrote:
I wouldn't bother with fgrep or egrep. If you have to do anything more
complicated than that you may as well learn sed or awk as, with the
exception of a couple of cute GNU grep extensions, their syntax is as
simple as greps for what grep does but they're extensible to do things
grep can't do. The most extensible with the simplest syntax for
anything even moderately complex is awk but sed is also very useful
for simple searching/subsitutions on a single line.

I agree with your general sentiment, and also your recommendation of AWK
(as the best balance between high level and low level). I disagree with
the (tepid) recommendation of sed - I find that once one knows AWK, sed
drops off the radar.

But, having said that, the fact is, this is, and one of
the groupthink principles of this newsgroup is that you *should* learn the
plethora of tools (join, comm, pr, sed, etc) and use them all. Also,
all the shell built-ins, like "read", etc.

Finally, my guess at the underlying meaning of the OP is that he is
dealing with existing code and/or a corporate situation where knowing
all these obscure tools is going to be necessary for him to work. I
know that in one of my former jobs, a lot of the existing shell codebase
used all these tools (join, comm, pr, sed, etc) to do things that could
have been done much more easily with a single, unified AWK script. But
ya gotta deal...

No, I haven't, that's why I'm asking questions. If you won't help me,
why don't you just go find your lost manhood elsewhere.

CLC in a nutshell.