[SLUG] grep

Al Girling al at gcguk.demon.co.uk
Fri Mar 31 13:57:01 BST 2006


On Fri, Mar 31, 2006 at 08:17:20AM BST, Stephen O'Neill wrote:
> john at johnallsopp.co.uk wrote:
> 
> >How do I get it just to print the matching file names and the count?
> >
> 
> That's frustrating, I'm sure I've asked the exact same question and 
> solved it before. However I'm sat on a windows box with no cygwin and 
> not the machine I did it on.
> 
> However, my initial thoughts are to pipe that to another grep that 
> excludes ":0$" or however the count is output.

Does:

$ grep -c "thingy" * | grep :[1-9]

do what you want?

Al

-- 
Al Girling

Home page:                  <http://al.sdf-eu.org>
Linux User: #290080         <http://counter.li.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.lug.org.uk/pipermail/scarborough/attachments/20060331/7f308414/attachment.bin


More information about the Scarborough mailing list