Count the number of Grep Matches in files

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

Added by JC on 13th July 2010

Comments

There are no comments about this snippet.

Post Comment Github Markdown Supported

You must be logged in to post a comment.

Login here to post a comment