Open bittorf opened 8 years ago
GNU grep as of some version 2.11 (changelog entry) assumes that a missing filename means the current directory when run with the -r, --recursive
flag.
@deryni interesting - thanks, the feature is from march 2012 and it is not POSIX 8-) so still a valid case and a warning should be OK. for interactive scripting it's OK to leave the filename blank, but for real you should do a
grep -r PATTERN ./
I agree completely. I just wanted to point out that it is technically valid (for GNU grep).
like https://github.com/koalaman/shellcheck/issues/452 we should warn about a forever hanging grep, e.g.
or
with a forgotten filename.