I'm using Ubuntu (and Bash, like normal) and need to find a dir diff showing files in one dir and not in another, etc .
this is simply the command diff -q -r dir1 dir2.
However, I'm using source controlled directories, so this shows up with a whole mess of gall-durn .svn directories, etc. So I need to filter this out and an alias won't work.
Here's the code for my dirdiff or diffdir bash script:
if (!(test -d $1))
echo "bad dir 1";
if (!(test -d $2))
echo "bad dir 2";
out=`diff -q -r $1 $2 | egrep -v svn `;
# echo "Result of diff: $out";
if [ -z "$out" ]
echo "Difference between $1 and $2: "
# echo "Done";