I\'m using grep to match string in a file. Here is an example file:
example one, example two null, example three, example four null,
grep
or in perl (for completeness...):
perl -npe 'chomp; /null/ and print "$_ - Line number : $.\n" and $i++;$_="";END{print "Total null count : $i\n"}'