#!/bin/sh
#avoid special characters like quotes and brackets
STRING=asdfg
for i in `find . -name "*.php"`; do
{
C=`grep -c --max-count=1 "$STRING" $i`
if [ "$C" -gt 0 ]; then
echo $i;
#perl regex here, on $i, if needed
fi
};
done;
exit 0;
perl -pi -e 's/asdfg//' $i








