In trying to track down a bug between two subtly different branches of code, I needed to know which files are different in the two branches (information which cvs doesn't always give), so I wrote this:
for file in `find lib -name '*.pm' -print`; \ > do diff --brief $file /home/ovid/work/master/$file; done 2>&1 \ > |grep -v 'No such file'|cut -d ' ' -f 2
Surely there's a better way to get a list of which files are different in two virtually identical directory structures?
Re: Easier Bulk Diff?
Ovid on 2007-07-20T09:51:54
That helps. I can use it to get that command down to this:
diff -qr kill_dh_server/lib/ shared_cp/lib/|egrep -v 'CVS|Only in'|cut -d ' ' -f 2That let's me ignore CVS directories and files which are in one and not the other. If I want to include the latter:
diff -qrN kill_dh_server/lib/ shared_cp/lib/ | grep -v CVS | cut -d ' ' -f 2It doesn't quite restrict me to everything I want, but it's pretty close. Thanks!