#!/usr/bin/env /opt/ASPLv1.00/bin/aspl #ENVARG= -groupingclass POSIX -wsname WS1FNCMP -singlepass ;;*********************************************************************** ;; run-functions-to-compare-groups.aspl ;; ;; This script shows how to run the functions to compare two groups. ;; Various functions are defined to compare groups, their subgroups, ; and their elements. ;; ;;*********************************************************************** def a1 = ggdir(dir,/tmp/aa1,nmdir,*,nmfl,*,calchksum,1,calentropy,1) a2 = ggdir(dir,/tmp/aa2,nmdir,*,nmfl,*,calchksum,1,calentropy,1) printblock *** CALLING cmp2sets() to compare two groups ***%%%CR*** {gU {g\, %%1 %%2}{g\, %%2 %%1}{g&, %%1 %%2}} *** FN cmp2sets(a1,a2) printblock *** CALLING cmp2mtmeq() to compare two groups where mtimes are the same ***%%%CR*** {gU {g\,`mtm~ %%1 %%2}{g\,`mtm~ %%2 %%1}{g&,`mtm= %%1 %%2}} *** FN cmp2mtmeq(a1,a2) printblock *** CALLING cmp2mtm() to compare two groups where mtimes are different ***%%%CR*** {gU {g\,`mtm= %%1 %%2}{g\,`mtm= %%2 %%1}{g&,`mtm~ %%1 %%2}} *** FN cmp2mtm(a1,a2) printblock *** CALLING cmp2chkeq() to compare two groups where checksums are the same ***%%%CR*** {gU {g\,`c~ %%1 %%2}{g\,`c~ %%2 %%1}{g&,`c= %%1 %%2}} *** FN cmp2chkeq(a1,a2) printblock *** CALLING cmp2chk() to compare two groups where checksums are different ***%%%CR*** {gU {g\,`c= %%1 %%2}{g\,`c= %%2 %%1}{g&,`c~ %%1 %%2}} **** FN cmp2chk(a1,a2) printblock *** CALLING fcmp2sets() to compare the elements of two groups ***%%%CR*** {fU {f\, %%1 %%2}{f\, %%2 %%1}{f&, %%1 %%2}} **** FN fcmp2sets(a1,a2) printblock *** CALLING fcmp2mtmeq() to compare the elements of two groups where mtimes are the same ***%%%CR*** {fU {f\,`mtm~ %%1 %%2}{f\,`mtm~ %%2 %%1}{f&,`mtm= %%1 %%2}} *** FN fcmp2mtmeq(a1,a2) printblock *** CALLING fcmp2mtm() to compare the elements of two groups where mtimes are different ***%%%CR*** {fU {f\,`mtm= %%1 %%2}{f\,`mtm= %%2 %%1}{f&,`mtm~ %%1 %%2}} *** FN fcmp2mtm(a1,a2) printblock *** CALLING fcmp2chkeq() to compare the elements of two groups where checksums are the same ***%%%CR*** {fU {f\,`c~ %%1 %%2}{f\,`c~ %%2 %%1}{f&,`c= %%1 %%2}} *** FN fcmp2chkeq(a1,a2) printblock *** CALLING fcmp2chk() to compare the elements of two groups where checksums are different ***%%%CR*** {fU {f\,`c= %%1 %%2}{f\,`c= %%2 %%1}{f&,`c~ %%1 %%2}} *** FN fcmp2chk(a1,a2) printblock *** CALLING dcmp2sets() to compare the subgroups of two groups ***%%%CR*** {dU {d\, %%1 %%2}{d\, %%2 %%1}{d&, %%1 %%2}} *** FN dcmp2sets(a1,a2) printblock *** CALLING dcmp2mtmeq() to compare the subgroups of two groups where mtimes are the same ***%%%CR*** {dU {d\,`mtm~ %%1 %%2}{d\,`mtm~ %%2 %%1}{d&,`mtm= %%1 %%2}} *** FN dcmp2mtmeq(a1,a2) printblock *** CALLING dcmp2mtm() to compare the subgroups of two groups where mtimes are different ***%%%CR*** {dU {d\,`mtm= %%1 %%2}{d\,`mtm= %%2 %%1}{d&,`mtm~ %%1 %%2}} **** FN dcmp2mtm(a1,a2) printblock *** CALLING uni2diff() to get the union of the differences between two groups ***%%%CR*** {gU {g\, %%1 %%2}{g\, %%2 %%1}} *** FN uni2diff(a1,a2) printblock *** CALLING g2symdiff() to get the Symmtric Difference between two groups ***%%%CR*** {gD %%1 %%2} *** FN g2symdiff(a1,a2) printblock *** CALLING f2symdiff() to get the elements Symmtric Difference between two groups ***%%%CR*** {fD %%1 %%2} *** FN f2symdiff(a1,a2) printblock *** CALLING duni2diff() to get the subgroups union of the differences between two groups ***%%%CR*** {dU {d\ %%1 %%2}{d\ %%2 %%1}} *** FN duni2diff(a1,a2) printblock *** CALLING d2symdiff() to get the subgroups Symmtric Difference between two groups ***%%%CR*** {dD %%1 %%2} *** FN d2symdiff(a1,a2) printblock *** CALLING uni2diffmtmeq() to get the union of the differences between two groups where mtimes are the same ***%%%CR*** {gU {g\,`mtm~ %%1 %%2}{g\,`mtm~ %%2 %%1}} *** FN uni2diffmtmeq(a1,a2) printblock *** CALLING uni2diffmtm() to get the union of the differences between two groups where mtimes are different ***%%%CR*** {gU {g\,`mtm= %%1 %%2}{g\,`mtm= %%2 %%1}} *** FN uni2diffmtm(a1,a2) printblock *** CALLING uni2diffchkeq() to get the union of the differences between two groups where checksums are the same ***%%%CR*** {gU {g\,`c~ %%1 %%2}{g\,`c~ %%2 %%1}} FN uni2diffchkeq(a1,a2) printblock *** CALLING uni2diffchk() to get the union of the differences between two groups where checksums are different ***%%%CR*** {gU {g\,`c= %%1 %%2}{g\,`c= %%2 %%1}} *** FN uni2diffchk(a1,a2) printblock *** CALLING funi2diff() to get the elements union of the differences between two groups ***%%%CR*** {fU {f\, %%1 %%2}{f\, %%2 %%1}} **** FN funi2diff(a1,a2) printblock *** CALLING funi2diffmtmeq() to get the elements union of the differences between two groups where mtimes are the same ***%%%CR*** {fU {f\,`mtm~ %%1 %%2}{f\,`mtm~ %%2 %%1}} *** FN funi2diffmtmeq(a1,a2) printblock *** CALLING funi2diffmtm() to get the elements union of the differences between two groups where mtimes are different ***%%%CR*** {fU {f\,`mtm= %%1 %%2}{f\,`mtm= %%2 %%1}} *** FN funi2diffmtm(a1,a2) printblock *** CALLING funi2diffchkeq() to get the elements union of the differences between two groups where checksums are the same ***%%%CR*** {fU {f\,`c~ %%1 %%2}{f\,`c~ %%2 %%1}} *** FN funi2diffchkeq(a1,a2) printblock *** CALLING funi2diffchk() to get the elements union of the differences between two groups where checksums are different ***%%%CR*** {gU {g\,`mtm~ %%1 %%2}{g\,`mtm~ %%2 %%1}{g&,`mtm= %%1 %%2}} *** FN funi2diffchk(a1,a2) printblock *** CALLING duni2diffmtmeq() to get the subgroups union of the differences between two groups where mtimes are the same ***%%%CR*** {dU {d\,`mtm~ %%1 %%2}{d\,`mtm~ %%2 %%1}} *** FN duni2diffmtmeq(a1,a2) printblock *** CALLING duni2diffmtm() to get the subgroups union of the differences between two groups where mtimes are different ***%%%CR*** {dU {d\,`mtm= %%1 %%2}{d\,`mtm= %%2 %%1}} *** FN duni2diffmtm(a1,a2) endscript __END__ $00 runs various functions to compare two groups