Posted on September 15, 2010 by Maurice RuckmanCount Occurrences of Search String In UNIX/Linux, you can use grep and wc to count occurrences cat mystuff.txt | grep -i "search" | wc -l