linux grep question

Posted by lepricon123 on Super User See other posts from Super User or by lepricon123
Published on 2010-04-29T21:37:27Z Indexed on 2010/04/30 2:17 UTC
Read the original article Hit count: 496

Filed under:
|

how do i find a string in files in a directory. And these file names begin with letter a. I also want to get the number of occurrences of this string fromt he grep I run.

I tried this

cat * | grep -c string but it searches all files. I just want to search files that begin with letter a

Thanks

© Super User or respective owner

Related posts about linux

Related posts about grep