Hello, On Sat, 18 Mar 2017, Carlos E. R. wrote:
On 2017-03-17 08:34, Andreas Mahel wrote:
The issue in the systemd unit directory is different: in that folder exists a file named "-.slice".
And the file name starting with a dash will make grep interpret this as a set of command line options, where it fails at the first one already, the dot.
Grep could deduce that, as that "-.slice" is an apparent option in the middle of some files, that it is an error, and report it as such.
Albeit, yes, but that would be some heuristic doomed to fail in the
most inconvenient way at some point... Better stay with what most
other commands do and be consistent.
Consider:
$ grep bla foo*
you remember, fsck, I need just a fixed-string search
$ grep bla foo* -F
you remember you need to search bar* too
$ grep bla foo* -F bar*
With your proposition, this would not be possible. Yes, it's stupid.
But not quite unrealistic, if your wrangling long cmd-lines and know
the GNU toolchest / getopt.
just a thought and my 2¢,
-dnh
--
"Being disintegrated makes me ve-ry an-gry!"