grep only returns help text
Posted
by
Pete Mancini
on Server Fault
See other posts from Server Fault
or by Pete Mancini
Published on 2012-12-17T21:08:47Z
Indexed on
2012/12/17
23:04 UTC
Read the original article
Hit count: 231
Well, I am perplexed. I am working with an Ubuntu server and I type in
grep 'bash' *.sh
BUT
fgrep 'bash' *.sh
works like a champ.
which grep
and
which fgrep
both point to their respective executables in /bin. I am perplexed as to what I am doing wrong.
EXAMPLE output:
$ grep -F 'grounding' repl.clj
Usage: grep [OPTION]... PATTERN [FILE]...
Search for PATTERN in each FILE or standard input.
PATTERN is, by default, a basic regular expression (BRE).
Example: grep -i 'hello world' menu.h main.c
$ fgrep 'grounding' repl.clj
(p/concepts-for-grounding-term imp1 "PERSON" "summary")
See? grep is failing but fgrep is working fine. That is why I am perplexed.
© Server Fault or respective owner