I’ve always wondered how to grep for the negation of something. When SubClipse messes up, I end up spending time in the terminal. I hate it. It should at least be able to recover from itself.
Anyway, I wanted to find the difference between two directories. So for diff, you simply use:
diff -rq directory1/ directory2/
And this will give you a slew of which files are different or same. But it’ll give you all this stuff about .svn directories that you don’t care about. So how do you grep for the NOT of something? I don’t know, the regex for it (if someone cares to divulge, I’d appreciate it), but grep has a switch that does this for you:
diff -rq directory1/ directory2/ | grep -v 'svn'
And voila, it only gives you the differences other than paths with ‘svn’ in them.