> Better:
> 
> find . -name '*.c' -o -name '*.h' -exec egrep '//' {} /dev/null \; | \
>       grep -v '://'
> 
> (to get rid of false matches on URLs)

Why not:

grep "//" `find . -name "*.[ch]"` | grep -v 'p://'

(the -o option doesn't seem to work as advertised in the man page)
Don't forget that ":" is used between the filename and matching line, and
if your line begins with //, grep -v '://' chucks that valid match.

--Moses

Reply via email to