Ok, ok. So lets say you are using wordpress and want to find all the deprecated images in your theme’s image directory. Because I’m a madcap party animal, I’d say you could do something like this:
for i in *.*; do
RES=`grep -lIrc "$i" * | grep -v ":0" -`
if test -n "$RES"; then
echo "$i good, $RES";
echo "$i deprecated";
#echo "move $i deprecated";
fancy right? That’s how I get down for Saturday night.