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
[
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
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