4 ms·
Also precede the file list by `--`. A very confusing thing can happen if a file happens to begin with a dash... (You can intersperse options like `-e pattern` a
by kwoff 6y ago
Also precede the file list by `--`. A very confusing thing can happen if a file happens to begin with a dash... (You can intersperse options like `-e pattern` among file names, if for some reason you wanted to do that.)
- iforgotpassword 6y agoBut that's not grep specific and generally a good idea, especially in scripts that get the file names from their command line, some input file or god knows where.
- steerablesafe 6y agoIf the command line utility doesn't support -- or equivalent then you can prepend "./" for untrusted filenames.