Snippets v2

Languages
My Snippets

Count the number of Grep Matches in files Login or Register to Bookmark this snippet

Description Bash

This script will return a count of the times that a search string appears in all files beneath the current dir.

The Code Download
  1. #!/bin/bash
  2. find | grep -v ".svn" | grep -v " " |  xargs grep --colour -H -n "$1" | wc -l
Credits Contact JC

Added by JC on 13th July, 2010

Comments

There are no comments about this snippet.

Post Comment HTML is allowed

You must be registered and logged in to post a comment.

Login here to post a comment