in reply to Re: sum of counts from unix grep -c
in thread sum of counts from unix grep -c

% cat tmp1 llama camel % cat tmp2 camel gecko % cat tmp1 tmp2 | grep -hc camel 2 % grep -hc camel tmp1 tmp2 1 1 %
Not a useless use of cat after all. :) cat concatenates the files into a single stream, which is exactly what one needs in order to get a total count over all the files.

Replies are listed 'Best First'.
Re: Re: Re: sum of counts from unix grep -c
by merlyn (Sage) on Jan 18, 2002 at 19:26 UTC
      "files" is plural.
      No indication whatsoever, except that "files" is plural.