LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   simple shell problem (https://www.linuxquestions.org/questions/linux-general-1/simple-shell-problem-67324/)

kev82 06-22-2003 05:33 PM

simple shell problem
 
i can use grep -rhc to give me a list of the number of occurences of a regexp in the files in a directory, im wondering if anyone can tell me an easy way to sum it?

acid_kewpie 06-22-2003 05:41 PM

can't think of a really easy way using that command, but if you *don't* subtotal with the -c and pipe is all to, among a number of candidates, "wc -l" that will count *all* the lines.

kev82 06-22-2003 05:44 PM

ahh, hadnt thought of that, cheers


All times are GMT -5. The time now is 06:21 AM.