#!/bin/bash find ../ -name "*.[h|cpp|c]" | while read F do grep "class.*:.*," $F | sed 's/\(.*\)\<.*\>\(.*\)/\1<...>\2/' | grep "class.*:.*," if [ $? == 0 ] then echo "FILE: $F" fi done