Well, that was a bad attempt, but this should get you really close:
for i in $(find . -name '*.cc' -or -name '*.h'); do echo $i; cat $i | perl -pe 's/\bm_([a-zA-Z0-9_]+)/\1_/g' > $i.tmp; mv $i.tmp $i; done
Well, that was a bad attempt, but this should get you really close:
for i in $(find . -name '*.cc' -or -name '*.h'); do ([a-zA- Z0-9_]+ )/\1_/g' > $i.tmp;
echo $i;
cat $i | perl -pe 's/\bm_
mv $i.tmp $i;
done