home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / misc / src / rpm / gendiff < prev    next >
Text File  |  1997-09-17  |  208b  |  13 lines

  1. #!/bin/bash
  2.  
  3. [ -z "$1" -o -z "$2" ] && {
  4. # usage
  5.   echo "usage: $0 <directory> <diff-extension>" 1>&2
  6.   exit 1
  7. }
  8.  
  9. find $1 \( -name "*$2" -o -name ".*$2" \) -print |
  10. while read f; do
  11.     diff -u $f ${f%%$2}
  12. done
  13.