[KLUG Members] grep, egrep, fgrep

Robert G. Brown members@kalamazoolinux.org
Thu, 06 May 2004 10:11:36 -0400


On 06 May 2004 10:04:13 -0400, John Pesce <pescej@sprl.db.erau.edu> wrote:

>Hi,
>
>Can anyone explain why there are still three different greps?
>One of my associates says that they each were written for a purpose but
>supposedly their functionality should all be combined into just plain
>grep now.
legacy compatibility. Lots of people don't want to go back and fix
all those scripts that refer to fgrep and egrep. There's also fear 
of introducing new prblems, cost of reetesting, etc...

>The reason I ask is I often need to search for filenames with a period
>in my pattern, like '.s' ,...  Should I still be
>escaping the period somehow anyway?
IMO, yes. I do it with success:  ls -l |grep \.s

							Regards,
							---> RGB <---