bug#34951: [PATCH] grep: a kwset matcher not work in a grep matcher

2019-03-29 Thread arnold
Hi. Norihiro Tanaka wrote: > Missing a patch for dfa. Re-send correct patch file. Paul - is this going to be merged into GNULIB? If so, I'll put it into gawk now; I want to make a release soon. Thanks, Arnold [

bug#35043: Is there a way to show file name once just before all the matches in the file?

2019-03-29 Thread Peng Yu
Hi, By default, filenames are shown at the same lines of the matches (when there are multiple files). But I'd like a filename only shown once before all the matches in the given file. Is there an option to do so with grep? Thanks. -- Regards, Peng

bug#35043: Is there a way to show file name once just before all the matches in the file?

2019-03-29 Thread Paul Jackson
The following awk command will do this (so long as filenames don't have ':' colon chars): grep IP /etc/protocols /etc/services | awk -F: ' $1 != fname { print $1 ":"; fname = $1; } { sub("^[^:]*:", ""); print; } ' -- Paul Jackson p...@usa.net