multi level diff using find
I'm trying to diff files in different directories, but I don't want to
diff everything. The compiler produces subdirectories like debugger,
unshared, and profiled. I don't care what's in them, or if the .o
files are different. So far I've gotten this far:
export SRC=query_E
export TGT=query_D
find $SRC -name debugger -prune \
-o -name unshared -prune \
-o -name profiled -prune \
-o -name '*.c' -exec diff '{}' `echo {} | tr $SRC $TGT` \;
I don't know why tr isn't substituting $SRC for $TGT at all. It just
creates "diff query_E/... query_E/..."
What am I doing wrong?
I looked at someone else's solution which had an exec as follows:
-exec diff '{" $TGT
The problem is if find goes down more than 1 level, it will not match
$TGT anymore.
Thanks,
Craig
|