Linux (or Unix) grep without any options does a regex grep on input stream. To disable regex either one can use grep -F
or fgrep
. Here are some examples.
Default grep example
printf "foophp\nfoo.php\n" | grep ".php"
foophp foo.php
Env: GNU bash, version 4.2.46
grep without regex example
printf "foophp\nfoo.php\n" | grep -F ".php"
foo.php
Env: GNU bash, version 4.2.46
fgrep example
printf "foophp\nfoo.php\n" | fgrep ".php"
foo.php
Env: GNU bash, version 4.2.46