#!/usr/local/bin/perl $w = "[ \t]"; $target = $ARGV[0]; while (1) { $command = "egrep -n '^$w*\@interface$w+$target$w*:' \*.h"; $found = false; push @files, "$target.h"; open (GREP, "$command|"); while () { if (/\@interface.*:\s*(\S*)\s*/) { $target = $1; $found = true; last; } } close GREP; last if ($found eq false); } print "@files\n"; __END__ Author: Geoffrey S. Knauth , 21 Feb 1997 Copying: GNU General Public License; No Warranty USAGE objc-parents OBJC-CLASSNAME EXAMPLE % objc-parents EltNodeCollector EltNodeCollector.h IndexedCollection.h KeyedCollection.h \ Collection.h NSObject.h BUGS Only looks in current directory.