El 03/08/17 a las 13:16, Paul Eggert escribió: > On 08/03/2017 06:28 AM, Santiago R.R. wrote: > > the -o option, which is supposed to return only the matching > > parts of the search, fails: > > It's not failing. It's behaving as documented: -o outputs only nonempty > matches. Otherwise, commands like 'grep -o "a*"' would output a separate > line for each byte in the input. Although this behavior for -o is > longstanding and is documented in the manual, it's not in the grep --help > output so that's an oversight. I installed the attached to fix grep --help, > and am closing the bug report on the GNU side. > > Users who want to match empty lines can use 'grep "^$"', which is what I'd > expect them to do anyway (-o would be superfluous there even if it included > empty matches). >
Thanks for clarifying. I'll include the patch in Debian and close the bug accordingly. Santiago