home *** CD-ROM | disk | FTP | other *** search
- `classify' is a utility for comparing many files to each
- other all at once. For example, if you manage a collection
- of diskless workstations, you can see which machines are
- using the same rc.local file by executing the command
-
- classify /export/root/*/etc/rc.local
-
- (or something like it ) on the server machine.
-
- If you want to edit the motd files on these
- workstations, you can use a script like this:
-
- foreach i ( `classify -1 /export/root/*/etc/motd` )
- set ifamily=`classify -m $i /export/root/*/etc/motd`
- $EDITOR $i
- foreach j ($ifamily)
- cp $i $j
- end
- end
-
- which groups the motd files into classes of identical files,
- invokes the editor on one motd from each class, and then
- propagates the changes to the other motds in each class.
-
- The `test?' files are sample inputs so you can see what
- `classify' is doing. Some of the `test' files differ only
- in the case of some of their letters; some have extraneous
- whitespace of various types, some are really the same as
- each other ands some are genuinely different.
-
- To-Do:
-
- `classify' might have better performance if it did
- `stat' on files it was comparing to see what their i-numbers
- were; if two files are on the same device and have the same
- i-number, then they are necessarily identical, and don't
- need to be compared character-by-character. It might also
- be worthwhile to keep a cache of the first block or so of
- one file from each class, to save repeatedly opening and
- closing files.
-
- Mark-Jason Dominus
- mjd@saul.cis.upenn.edu
-