Hello Dietmar, > > The standard specifies, for the -f flag: > > > > “Patterns in pattern_file shall be terminated by a <newline>. A null > > pattern can be specified by an empty line in pattern_file.” > > The above does not rule an empty pattern_file (i. e. no patterns) out. > The actually relevant part from > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html > is: > > -f pattern_file > Read one or more patterns from the file named by the pathname > pattern_file. … > > > So calling grep -f with an empty file is non-standard thus not a BUG > > per se. > > True, but because of the wording "one or more patterns".
Well, it's a combination of both. You don't get an empty set of patterns without specifying a pattern must be an empty line. But this is my mistake for keeping implied that yes, specifying an option means it mustn't be empty. ^^ Now to the actual issue, I think this comes from line 746 of findutils/grep.c, wanting to mimic GNU extensions is not always a good idea. I really don't have time to debug it myself atm until Monday, thought it was worth putting out a direction. Thanks! _______________________________________________ busybox mailing list firstname.lastname@example.org http://lists.busybox.net/mailman/listinfo/busybox