One Quickie

Seeing lines that exist in two files (Unix->General)
Assuming the files are sorted, you can use comm.

Here I'm wondering if any objc files in the current directory also exist in the Classes subdirectory

% ls -1 *.[hm] *.xib | sort > oopack
% cd Classes
% ls -1 *.[hm] *.xib | sort > ../oop2
% cd ..
% comm -12 oopack oop2
The -12 suppresses lines only in file1, and lines only in file2. I'm more interested in their intersection.

borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book