home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / classify / README < prev    next >
Encoding:
Text File  |  1992-02-28  |  1.5 KB  |  44 lines

  1.     `classify' is a utility for comparing many files to each
  2. other all at once.  For example, if you manage a collection
  3. of diskless workstations, you can see which machines are
  4. using the same rc.local file by executing the command
  5.  
  6.     classify /export/root/*/etc/rc.local
  7.  
  8. (or something like it ) on the server machine.
  9.  
  10.     If you want to edit the motd files on these
  11. workstations, you can use a script like this:
  12.  
  13.     foreach i ( `classify -1 /export/root/*/etc/motd` )
  14.         set ifamily=`classify -m $i /export/root/*/etc/motd`
  15.         $EDITOR $i
  16.         foreach j ($ifamily)
  17.             cp $i $j
  18.         end
  19.     end
  20.  
  21. which groups the motd files into classes of identical files,
  22. invokes the editor on one motd from each class, and then
  23. propagates the changes to the other motds in each class.
  24.  
  25.     The `test?' files are sample inputs so you can see what
  26. `classify' is doing.  Some of the `test' files differ only
  27. in the case of some of their letters; some have extraneous
  28. whitespace of various types, some are really the same as
  29. each other ands some are genuinely different.
  30.  
  31. To-Do:
  32.  
  33.     `classify' might have better performance if it did
  34. `stat' on files it was comparing to see what their i-numbers
  35. were; if two files are on the same device and have the same
  36. i-number, then they are necessarily identical, and don't
  37. need to be compared character-by-character.  It might also
  38. be worthwhile to keep a cache of the first block or so of
  39. one file from each class, to save repeatedly opening and
  40. closing files.
  41.  
  42. Mark-Jason Dominus
  43. mjd@saul.cis.upenn.edu
  44.