konnoさん
たぶん、こうなるのが正しいでしょう。
C:\WK>type t.txt (対象ファイルの中身)
yagrep.exe
yagrepxexe ;2行目は「.」でなく「x」
C:\WK>grep "yagrep.exe" t.txt(「.」はメタキャラ)
yagrep.exe
yagrepxexe ;両方ヒットする
C:\WK>fgrep "yagrep.exe" t.txt
yagrep.exe ;リテラルなのでピリオドだけヒットする
grep.exe, egrep.exe, fgrep.exe は最近では廃止されて、かわりに
grep -E, grep -F を使え、ということらしいです。
たぶん、古くからの UNIX的慣習で、egrep, fgrep へのリネーム技が
互換性の意味で、残されているみたいでした。
GREP(1) UNIX Programmer's Manual GREP(1)
There are three major variants of grep, controlled by the
following options.
-G Interpret pattern as a basic regular expression
(see below). This is the default.
-E Interpret pattern as an extended regular expression
(see below).
-F Interpret pattern as a list of fixed strings, sepa-
rated by newlines, any of which is to be matched.
In addition, two variant programs egrep and fgrep are
available. Egrep is similiar (but not identical) to
grep -E, and is compatible with the historical Unix egrep.
Fgrep is the same as grep -F.
とあります。うーん、"fixed strings"か。regexでない、という意味?
エンジンの動き方が違うのかな?
質問されても、たぶん答えられないと思う。内容も英語も。
追記:fixed strings は「固定長文字列」と訳されていました。なるほど。
"a+" というパターンだと、ヒット文字列は、「a」も「aa」もありうる。
これは「固定長」ではないですね。