Allan McRae wrote:
> Grep-2.6.2 will hang on "grep -Ff foo bar" if foo contains an empty
> line.  The bug is new to 2.6.2.

Thanks for the report.
However, so far, I am unable to reproduce that.

Please provide more details:
  - type of CPU and OS you are using
  - the contents of your "foo" and "bar" files

As far as I can see, blank lines in the pattern file
cause no problem at all:

  $ src/grep -Ff <(printf 'a\n\nb\n') <(seq 10)
  1
  2
  3
  4
  5
  6
  7
  8
  9
  10

I repeated with variants, in case blank lines
at the beginning or end made a difference.
None of those made grep hang.

  $ src/grep -Ff <(printf '\n\na\n\nb\n') <(seq 10)
  ...
  $ src/grep -Ff <(printf '\n\na\n\nb\n\n') <(seq 10)
  ...

Even tried adding blank lines at the end and beginning
of the searched file:

  $ src/grep -Ff <(printf '\n\na\n\nb\n\n') <(seq 10;echo; echo)
  ...
  $ src/grep -Ff <(printf '\n\na\n\nb\n\n') <(echo; echo;seq 10;echo; echo)


Reply via email to