[CentOS] question on grep

Jerry Geis geisj at pagestation.com
Wed Oct 10 18:15:17 UTC 2007


Is there a command line option on grep that says
count ALL occurances on a line not just the first one???

echo "jerry jerry" | grep -c jerry

only returns 1 and not 2.
Looking at the man page I did not see anything like that.

Thanks,

Jerry



More information about the CentOS mailing list