Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.
If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers
3

In addition, three variant programs egrep, fgrep and rgrep are
available. egrep is the same as grep -E. fgrep is the same as
grep -F. rgrep is the same as grep -r. Direct invocation as either
egrep or fgrep is deprecated, but is provided to allow historical
applications that rely on them to run unmodified.

The fact that they are the same executable on the filesystem isn't important, since it is likely that they change their behavior based on their own name. This is a minor optimization, to install and hardlink a single version of an executable to different names.

Ott - you got me thinking and I looked at my .bashrc file and sure
enough it had corruption in it on the line that aliased grep. I fixed
the line and now it works.

Learn from this lesson. Try to never ever alias or obfuscate the default commands like lsgrep-- it will only come and bite you later on.

Instead of aliasing something like this:

alias grep='grep --color=auto --whoopssometypo'

Give your alias an original name:

alias grepc='grep --color=auto --whoopssomettypo'

This way, you aren't breaking default commands and you can quickly spot typos through some quick tests. If grep works, and grepc does not work, you can quickly tell that your problem is with grepc not grep.

If you had made your modification to an environment file which was shared by multiple admins, you could have caused substantial problems at your workplace.

I sometimes make one exception to this rule. Many Linux distros will alias a handful of destructive commands. Here is an example from a RHEL5 system:

# alias
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'

The alias rm -i has saved me many times. However, relying on this alias is a bad habit, because sooner or later you'll be on a system where rm is not rm -i and you'll destroy files accidentally.